- This topic has 14 replies, 3 voices, and was last updated 1 year, 6 months ago by Tom.
March 25, 2020 at 1:51 pm #1210065Matt
Hi there. I have two sites that use Bibblio for related posts. I had injected that code via Elements – using the after content hook and “singular” pages. Worked like a dream.
I recently updated GeneratePress on one site (but not on another – hadn’t gotten to it). On the site I updated, that code no longer will fire. It shows in my view source, and the “related” text shows after content, but the related post section won’t appear. On the site where I didn’t update, the hook is still working perfectly and showing the related posts.
I’m not sure where to start to troubleshoot this. Were there any changes to the hooks with the latest update – or to the theme itself that would disallow specific code to fire?March 25, 2020 at 2:10 pm #1210074Matt
BTW – I just updated the other site listed, and the minute I did, the Bibblio code stopped working on that site too. It just won’t fire as it did in the previous after content hook set-up. Definitely related to the update.
I also tried using a plugin to inject the code as a widget after content – and it won’t fire that way either. Tried clearing all caches, etc. So don’t know if it’s related to the hook – looks more related to some other change in the update impacting the code from showing.March 25, 2020 at 2:25 pm #1210091LeoStaffCustomer Support
All hooks do is to let you add code/content to the specific places. It really doesn’t have the ability to decide whether the code is executed or not.
What is the code you are adding? Does it execute anywhere at all?March 25, 2020 at 2:37 pm #1210099Matt
It looks like this (taken out any aspects related to codes specific to my site):
data-style-classes=”bib–box-5 bib–split bib–size-16 bib–wide bib–site-show”
It’s definitely not the hooks area. It’s related to the update. On my second site I hadn’t updated, the hook was working perfectly. 15 minutes ago I decided to try and test whether the update “broke” the code from firing. Once I updated, the related posts vanished – just like on the first site I updated. It won’t even fire if I add a plugin to inject it after the post. Seems to be directly related to the update since it disappeared the minute I updated.March 25, 2020 at 2:41 pm #1210103Matt
My host just reverted to my back-up pre-update on the site I just tested, and the Bibblio widget now shows just fine.
It’s still not working on the site that’s running the newest version of GeneratePress. I could look to revert back to a back-up and see if I can find the right one pre-update. But wanted to see if you all had any thoughts what may be the issue before I land in a spot where I simply can’t update the theme any longer.March 25, 2020 at 2:50 pm #1210106LeoStaffCustomer SupportMarch 25, 2020 at 3:26 pm #1210133Matt
I keep up on updates, so whichever was the last version. And when I rolled back to the last version from a back-up, it started to work again on one of the sites.
Trying to get a staging site up to test on the site that’s still on the most current theme update.March 25, 2020 at 3:58 pm #1210149LeoStaffCustomer SupportMarch 25, 2020 at 4:05 pm #1210155Matt
I just tested injecting the code directly onto a post.
Site on 2.4.1: Injected and showed (showed twice, once for the injection, once for the hook)
Site on 2.4.2: Injected and didn’t show (neither the injection or the hook)
The hook is being seen as I have an h2 in there for “related”. Shows that, but nothing else is showing.March 25, 2020 at 4:07 pm #1210157Matt
Is there a way to reinstall 2.4.1 without reverting to a back-up from my host? I don’t recall which day I updated to choose the right back-up and I published content since then so would prefer not to chance having to rebuild that.March 25, 2020 at 4:08 pm #1210158LeoStaffCustomer SupportMarch 25, 2020 at 4:27 pm #1210168Matt
Unfortunately not – the issue won’t show on a staging site as Bibblio won’t show on my staging site since it’s not my website. And I can’t turn off my entire site (the plugins) to test. It gets a decent amount of traffic.
Both sites use most of the same plugins as it stands. And it’s working on one on 2.4.1 and not on 2.4.2. My ad network made some adjustments to add a new ad unit in before my comments section, but don’t think that would be doing it either, as other hooks that I have built are showing up above it. Looks to simply be this specific code.
There’s also no “related post” plugin – it’s just that code that calls the related post section in.
Is there a way to get a 2.4.1 version of the theme to reload? Otherwise I’m going to try to revert to a backup to see if they reappear under 2.4.1.March 25, 2020 at 5:25 pm #1210214TomLead DeveloperLead Developer
There are no front-end code differences between 2.4.1 and 2.4.2. Every single change was in the block editor only, and it was all CSS: https://github.com/tomusborne/generatepress/commit/6f641c6d1af9ca00a6dc0a70ec2a665da7a44798
Did you/anyone make any changes to the core theme code in 2.4.1? That’s the only explanation I can think of, unless there’s some sort of strange caching going on.
Maybe something injected into header.php?
You can download 2.4.1 here: https://wordpress.org/themes/download/generatepress.2.4.1.zipMarch 26, 2020 at 6:12 am #1210592Matt
Hey there – this has been resolved. The issue was updating, but nothing on your end. I wasn’t aware that the person I had help set up the related post widget had placed code on a template theme page, so it was overwritten on the update.
Thanks for your patience and help!March 26, 2020 at 9:54 am #1210990
- You must be logged in to reply to this topic.