Saltar navegación

[Resuelto] Views/Blocks is not retaining certain Block Styles upon AJAXified events

This support ticket is created hace 4 años, 6 meses. 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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

Etiquetado: , ,

Este tema contiene 5 respuestas, tiene 2 mensajes.

Última actualización por Jamal hace 3 años, 8 meses.

Asistido por: Jamal.

Autor
Mensajes
#1665049
How the Page's Post Body looks in View after pag..png
How is should look alike.png

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: enlace oculto
- 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

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

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 enlace oculto

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

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.

#2025171

Hello Beda and my apologies for not getting back to you earlier. I was reviewing my escalated tickets and this issue has been fixed a few release earlier.

I run a test on a clean install and I can confirm that the issue has been fixed. Please test from your side and let me know if the issue is completely fixed.