past-services-archive-service-archive-shortcode-problems-after-version-1-1-update

ForumCategory: Pluginspast-services-archive-service-archive-shortcode-problems-after-version-1-1-update
dgranja asked 5 months ago

I\’ve noticed a few problems after the upgrade regarding past services and the service archive page which is created by using [service-archive] shortcode. The upgrade is supposed to automatically update past archives to be compatible with the new fields, but until I edited at least one past service, the page that rendered in I.E. could only be described as \”a mess\”. Upon investigation, the \”mess\” appears to be that a bunch of data is dumped before the header of the page – if you scroll down, you will encounter the expected title bar of the page and the rest of the content beneath it. Lesson learned: update past services. Once you edit your past services, a past services archive page does render, but 2 problems remain: Only the last three services render properly. Services beyond that only have title/date/speaker information and are offset to the left. In Internet Explorer, the WordPress page itself does not follow the format of the rest of the site. For instance, the navigation menu on the left is \”outside\” of the page, and the widgets that should be on the right side of the page are stacked at the bottom (as if it is not following the responsive rules that the rest of the site is). This problem does not occur for me in Firefox, Chrome, or Opera. I have no workarounds for the latter problems at this time.

Margy Levine Young Staff replied 5 months ago

I know we are looking at an issue with IE, and that might be fixed — I’m checking.

Naomi Moon replied 5 months ago

It also looks very strange on this site https://www.uusmv.org/spirituality/sermon-archive/ in Safari and Chrome. Have not tried other browsers.

Margy Levine Young Staff replied 5 months ago

Are you using the latest version of the Services plugin? We fixed a bug in it within the last few days, I think.

dgranja replied 5 months ago

UUA Services Plugin Version 1.0.1, checking for updates indicates it is up to date.

JimGasperini replied 5 months ago

The Past Services page is now a mess on uucb.org as well. Yes, updated the Services plugin.

JimGasperini replied 5 months ago

Conforming the most recent services to the new date and time format did not change anything. The display is still all out of whack in Safari (looks just like the uusmv.org page linked above.)
>Only the last three services render properly. Services beyond that only have title/date/speaker information and are offset to the left
This is the way it always was (except for screwy layout). The most recent services display in full, older services just basic info with a link.

One more odd thing: when trying to enter the time for a Christmas eve service, the new Service Date and Time widget kept “correcting” a 10pm setting to 10am.

2 Answers
dgranja answered 5 months ago

Ok, do this to fix it. Hopefully the uuatheme team will incorporate this and update the plugin soon (which will then overwrite your changes):
Open the file (after taking your due diligence with backups, copying the original, etc.):
/public_html/wp-content/plugins/uua-services/inc/service-archive-shortcode.php
On line 63 – 69 you will see this:

<?php
$output=ob_get_clean();
wp_reset_query();
return $ouput;
?>

</div>

Ok, take that last line (“</div>”) and instead put it ABOVE line 63 (“<?php”).
That’s it, the page with your service archive shortcode should clean up after that.

dgranja replied 5 months ago

Oh BTW, that same service-archive-shortcode.php file sets posts per page to 15 and will only show detail for the first 3. Any after the first 3 will be abbreviated (no excerpt) and aligned left. If that bothers you, the number per page is determined by line 23:
‘posts_per_page’ => 15,
and the number after which it will abbreviate is set by line 36:
if ($sacount < 4 && $sapaged == 1) :
You can change that last line like this to have all show with excerpts…
if (1 == 1) :
…but it will get overwritten the next time the plugin is updated.

JimGasperini replied 5 months ago

Hmm. Thanks for this suggestion. However our page at
http://uucb.org/worship/service-archive/
still displays with strange layout, like the page Naomi linked to above. Perhaps this fixes something else?

dgranja replied 5 months ago

Wow, that is indeed a mess, my friend. What appears to be going on with your page is that the content is wrapped in an html tag, so it’s shoving everything into a format as if it is a code sample. Take a look at your page in “text” view (as opposed to “visual”) and make sure the ONLY thing on the page is the [service-archive] shortcode.

dgranja replied 5 months ago

The above should say, “It’s in an html ‘pre’ tag”. I had brackets around ‘pre’, but the forum deleted it from my post.

JimGasperini replied 5 months ago

Thanks. Removing the tag returned display on this page to normal.
I wonder where that tag came from? It is certainly not anything I did. The page displayed as expected before the upgrade.
I will report the continuing minor problem with the new date and time service widget in another thread.

Naomi Moon replied 5 months ago

Last night I found those tags inserted on my sermon archive page and removed them. I thought maybe my client had put them in there somehow doing a cut and paste. Interesting that they showed up on other sites as well. How could that happen?

dgranja answered 5 months ago

Thanks uua theme folks! This is resolved with plugin update version 1.0.2, released today. It moves the “div” tag to the appropriate location.
Pretty odd that more than one person had that “pre” tag show up on their page, but the update notes mentioned some other changes, so it may have been something accidental in their migration process that is now fixed. Onward.