[Resolved] Custom view styles only applied to first page of posts
This support ticket is created 3 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Hi, can we try these troubleshooting steps first?
- Temporarily deactivate all 3rd-party plugins except Types and Blocks
- Temporarily deactivate all custom code snippets in Toolset > Settings > Custom Code
- Temporarily activate a default theme like Twenty Twenty One
- Test subsequent page views again
- If the problem is resolved, reactivate your theme, plugins and code snippets one by one, testing each time until the problem returns
- If the problem is not resolved, I'll need to take a closer look.
Let me know the results of these tests, or if you'd prefer I run the tests in the staging server let me know and we can go from there.
Thanks!
FYI, I'm off work for the next couple of days so may not be able to respond promptly.
I will be back on Thursday, when I have to present this new website to the client at 10am.
If you are able to look at it before then I will be very grateful, but if not I'll just explain to the client that we are aware of the issue and are working on a solution.
Thanks for testing. Since the problem seems to occur with only Toolset plugins active, I'd like to create a clone of this site to try to reproduce the problem in a controlled test environment. To create the clone, I would like to install either the Duplicator plugin or the All-in-One WP Migration plugin. Let me know if you approve, and I can get started on that test. Thank you!
Okay after a bit of investigation I was able to isolate one element in this design that seems to be responsible for the broken styles. It seems the problem here is caused when the Post Body is displayed using a Single Field block in a View created using the Block editor. At first I was unable to replicate a similar problem in my local test site, but then I was able to isolate the source of the problem in my local copy of your site. Once I understood what caused the problem, I was able to replicate it in my own test site. To resolve the problem temporarily, I replaced the Single Field block used to display the post body with a custom HTML block. I placed a wpv-post-body shortcode in the custom HTML block to display the post body instead:
[wpv-post-body view_template="None"]
Now styles are shown as expected on all pages of results in both my local test site and my local copy of your site. You may also need to disable caching for this View by selecting the top-level View block and toggling off the "Cache View" option in the General panel of the sidebar.
Please let me know if you have trouble implementing this temporary workaround while our team investigates the problem in more detail.
Your workaround solution worked, except I had styling trouble as I need to target the last child paragraph to add the closed inverted commas. Using this new approach, the last child was no longer a P.
So, instead I added the post body afresh, but this time using a 'Field and Text' block, rather than a 'Single Field' block as I had before.
And guess what! It now works fine. hidden link
So, I'm happy with that. I guess this must still be some oddity causing the problem when a Single Field block is used, but using a Fields and Text block makes no difference.
You may wish to report the problem to your team as there's obviously a gremlin as using a Single Field (for body content) shouldn't have been a problem. But I'm happy as this now works fine.
Okay great, yes it seems the problem is specifically related to the Single Field block set to display the Post Body (content). Other blocks do not seem to produce the same styling issues. I'll communicate those details to the developers so they have all the pertinent information. Since you're satisfied with the Fields and Text block, I think we can close out here for now. I can send you an update through this ticket in the future when the problem has a permanent solution for the problem with the Single Field block.