Skip Navigation

[Escalated to 2nd Tier] Views/Blocks is not retaining certain Block Styles upon AJAXified events

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 4 replies, has 2 voices.

Last updated by Jamal 3 months, 1 week ago.

Assigned support staff: Jamal.

Author
Posts
#1665049

Hey Guys, this will be fun, me reporting a BUG in Toolset rofl.

So, I'm pretty sure there's a BUG in Toolset Views and Blocks AJAX events (Pagination, Search).
I'm reporting it here in the hope of a quick patch.

Steps to see the issue:
- Install and deploy this Duplicate: hidden link
- Navigate to /the-view/ page and paginate the View (there are two items in the loop, paginated by one with a "Next/Prev" pagination).
- Observe how on the second "page" (after AJAX) most (but not all) styles are not applying anymore.

To compare to what should be seen, check the two pages in the View Loop: "A first page", "Second Page". You will notice that the styles of blocks added to "Second Page" are not retained in the AJAXified View after pagination.
I also added two screenshots showing the difference(s).

Steps on fresh:
- Create some pages or posts with several Blocks (container, social media, whatnot, please try them all 🙂 ) and style them using the inbuilt features of either blocks or views.
- create a view (doesn't matter if with legacy Views or newer Blocks), paginate it by one, manually with AJAX update
- trigger the pagination on the front end and observe some styles are lost after AJAX fired (some blocks don't even display anymore as you will see).

I tested the issue with today's latest released versions, on several servers and browsers and I also replicated it on the attached (clean and fresh) duplicate.

Note
I noticed - on my live server - the issue is worse: for example, Containers retain background-styles locally but do not retain them online. These different results might be due to anything; I just couldn't replicate that small detail myself clean. I hence can't resist but suggest a full-stack test on "retain styles after AJAX events" in views 😉

Technically I suspect it is happening because Views/Toolset prints into the HTML the styles used as some base64 string or similar and then seems to parses that with JS back to CSS. After an AJAX event, this simply seems to "not happen" and hence, most of the styles are lost.
It's just a guess; I did not profoundly debug it.

I've checked errata etc., but could not find anything new.

PS
Blocks is excellent, no doubt, but Layouts and Views are more magnificent. I still can't substitute all features of magic Toolset, using Blocks.
Are you still taking suggestions/feature requests? I would have a few, just for the record 🙂

So, I hope we could get a quick patch for the issue, it would be cool - right now all Views need to be paginated "hard" (no ajax), and that's not so nice.

#1665487

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Beda, It is really nice to see you again, especially with a different username 🙂

Let me reproduce this on a clean install and give it a shot, most probably you have nailed it down and I'll need to escalate it.

I'll get back to you as soon as possible. Thank you for reporting this.

#1666483

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Beda, I built the Duplicator package locally and I can see the same issue.

Taking this a bit further, I built an unassigned content template that has one single field, the post content. Then I built a similar view and I used the unassigned content template on its loop, I still can see some missing styles(padding/margin), but most of the styles are still there. Check this screenshot for the 2 pages(inside the view query) and the view that I built hidden link

I am escalating this to the 2nd Tier and I'll get back to you as soon as possible.

#1666577

Hey Jamal, great you were able to replicate the issue and great to speak with you from the Client side 😀

Note, it's crucial to have the post which will "fail" at the second or subsequent position in the View because if you would be to load a View where the first post uses styles, those styles won't be lost (not even after AJAX pagination)

It will only happen on posts that come at the second or subsequent position in the View, in other words, posts that only get loaded by AJAX and never are loaded with a full browser refresh.

Well, I think you already knew that anyway 😉

Let's Second Tier and DEV do their magic!

Thanks again, I'll wait patiently for some solution.
PS, needless to say, I am available for beta or patch testing if it'll be required.
As usual, my sites offer a nice testing ground as I like to push the boundaries of anything really, but specially Toolset 😛
Just let me know if you need to run some tests I can also offer access to DEV ground if needed.

#1667171

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Beda and thank you for your feedback. It makes sense, the issue will appear only on posts that will be loaded through AJAX.

The ticket is now escalated to our developers, I'll keep the ticket ins the escalated to 2nd Tier to keep track of it.

Thank you for your suggestions, I'll keep you posted as soon as possible.