Skip Navigation

[Resolved] Custom view styles only applied to first page of posts

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.

This topic contains 10 replies, has 3 voices.

Last updated by Christian Cox 1 month, 2 weeks ago.

Assigned support staff: Christian Cox.

Author
Posts
#2161115

I am trying to: Custom post (Reviews) view styles are only being applied to the first page of posts

Link to a page where the issue can be seen: hidden link

I expected to see: Same as the first page.

Instead, I got: None of the custom styles applied to the view work on subsequently viewed pages, other than the first.

#2161203

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!

#2161823

Hi Christian,

Yes, have tried this but no resolution unfortunately.

I've switched to the default WP theme, deactivated all plug-ins except Toolset and WordFence. There are no custom code snippets.

hidden link

I'll leave it like this but need to reactivate everything this afternoon as I need to complete the website for my client today.

Look forward to hearing from you again.
Josh.

#2162277

Christian,

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.

Best wishes,
Josh.

#2162417

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Joshua,

Christian is currently out today on holiday and should be back tomorrow to continue assisting.

Thanks,
Shane

#2162601

Thanks for letting me know, Shane.

#2163063

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!

#2163095

Yes, Christian.

That's absolutely fine. I appreciate your help.

I'm fascinated to know the cause.

Regards,
Josh.

#2163677

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.

#2163851

Hi Christian.

Thanks again for your help with this.

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.

Josh.

#2163923

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.

Thanks again for the report!