Skip Navigation

[Resolved] Some block settings are no longer work after a simple page refresh

This support ticket is created 4 years, 9 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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: Asia/Kolkata (GMT+05:30)

This topic contains 22 replies, has 3 voices.

Last updated by Minesh 4 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#1501331

I am trying to create separate "views" on a page using "toolset" blocks. After I save the page everything looks good - but just until the first refresh or hard refresh then everything breaks down. I'm not using any caching plugin.

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

I expected to see: hidden link

Instead, I got: hidden link
Short video about the issue: hidden link

#1501571

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Yes - I can see the issue on your site and I can see that on the initial page load it looks Ok but as soon as you refresh the same page I can see the Grid Style is having the issue.

Can you please send me duplicator copy of your site:
=> https://toolset.com/faq/provide-supporters-copy-site/

I have set the next reply to private which means only you and I have access to it.

#1501605
#1501611

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you - Can you please grant access to everyone with the google drive link so that I can download it.

#1501629
#1503219

Hello,

I have worked more on the website, please have a look. It seems that where I'm using the conditional block or where I'm using more style settings like margins or overlaps there the problem appears. For instance at the bottom the "Oameni" and "Art" sections looks alright always. On the other hand on the top section and "Carti" section I have a more complex styling with a background color that is changing based in some conditions.

Thank you,
Robert

#1503357

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

thank you for sharing another layout.

I've escalated your issue to our next level support. Please hold on for further updates. I'll get in touch with you as soon as I know more.

#1507227

Hello Minesh,

When do you think you will have an answer to my problem? also do you think it's an eventually problem with "toolset blocks" or is it something with the way how I built the page?

Thank you,
Robert

#1508713

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - Thanks for sharing the video and duplicator package.

The way you build the templates have many issues like as we can see you have had added hundreds of conditional blocks.

So, Can we resolve this step by step. Is it possible for you to share a staging site where you can copy your existing current site and then we can go step by step.

First of all, I would suggest to you:
- Setup a staging site where we can play
- I suggest you should remove every piece of conditional block that is not used
- please share your exact needs so based on that I would be able to guide you in the right direction
- disable any server/plugin cache you are using
- I'm still wondering why you are using too many conditional blocks maybe we have a better workaround but I need to understand your requirement first.

So, can you first set up a staging site and send me access details for the same so we can take the next steps?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1510517

What I want to achieve is really simple - just 2 things:
1. changing the aspect ratio of a post thumbnail based on custom post type
2. changing the background color of a container based on some conditions

Post thumbnails
This website will have 2 types of articles: book reviews and regular articles. The featured image of a "book review" article is vertical oriented (book cover) while for a regular article is horizontal oriented. In a "View" where I want to show recent posts from both types of articles this is problematic because the vertical featured image is too big compared to the horizontal one. I need a different aspect ratio for "book review" custom post type because I don't want to crop its "featured image" (book cover) and another one for the regular articles where the featured image can be cropped.
Like this: hidden link
How I wanted to achieve…
I added 2 condition blocks to a “view” in one I put a container with fixed minimum height and inside I added the featured image just for the “book review” post type. In the other I added also a container block and for it’s background I set the current post featured image as a cover. So Like this I get what I wanted hidden link. The image is responsive, is cropped nicely everything is fine. In the other hand the Book Cover is not cropped and that is nice as well hidden link

Custom background colour for a container
I want to add a colour for every article that represents it. I set a number of 19 colours and I want to use them from a list hidden link In the end the articles should look like this hidden link

How I wanted to achieve…
I set a “custom field” for colours hidden link then a block container for each color with the respective color set as the background color. With the help of the conditional bloc I shoved just one container per post that has the wanted color hidden link

Please help me achieve all this in a simpler manner. You could create just one example page inside petit.xyz and I will continue from there. Or just guide me with scripts. You can login and do whatever you want, because petit.xyz it’s just a testing site. I can do by myself if you tell me how to.

By the way I did a test, I have removed all the condition blocks and the grid does not break… but I still need some sort of condition in order to achieve what I want.

Thank you

#1512669

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

So, basically, you do not need to add hundreds of conditional statements.

I've created the following page with block view. As you can see I've added only two conditional blocks.
=> hidden link

I can see the output on the frontend as given under:
=> hidden link

As you can see with the following screenshot: hidden link
- The first conditional block which check that if the post type belong to "recenzie" (review), so with review post type as you confirm you have verticl images, so within this block I've added the image block and you can style it as per your need.

I've added another conditional block that checks if the post type is NOT equal to "recenzie" (review), I've added the container block there as well and image block, you can style the output as per your need.

Please let me know if what I've done is not clear for you.

#1512675

Thank you!
hidden link I want to change the background colour from post to post. I have a custom field with the values. This is the only thing that is missing.

#1512699

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

There is no feature available to set the background color of the container block from the dynamic custom field value.

I see with the screenshot you shared you have almost 18-20 background color options available. => hidden link
I understand now why you added lots of conditional blocks before.

For that, you need to add the conditional block for each background color option and set the color value.

So, you already have two containers to display two different kind of image verticle and horizontal, to each container block you need to add 18-20 conditional blocks.

As you can see now, I've added another condition to the same conditional block to check if the value of Culoare =1. You need to add the same conditional block which should contain the container and image to display for your each 18-10 Culoare options where you should set the color dynamically.

So to the first conditional block I've added the and condition post type = recenzie and Culoare =1 .
=> hidden link

You need to add a new conditional block per your Culoare field options and set the container color.

Maybe in this case a classic view will be useful if you able to design your loop output on your own where you can apply the option color dynamically but again its totally different way to build to view as said using classic view where blocks is no involved.

#1512951

Hello Minesh,

So I did everything how you have suggested. You can check if you want. The issue is the same, everything is working fine until the fresh refresh. Thank you for your help.

R

#1512957

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Where you added all the conditional shortcocdes as I suggested with the test page I created?
=> hidden link

I do not see it in the backend:
=> hidden link

Can you please disable all cache and all other non-toolset plugins for now as well as send me the details where exactly I can see all the conditional statements you added?