Skip Navigation

[Escalated to 2nd Tier] Pages custom fields updated for all pages containing same view block

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

Our next available supporter will start replying to tickets in about 7.37 hours from now. Thank you for your understanding.

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: Asia/Hong_Kong (GMT+08:00)

This topic contains 15 replies, has 2 voices.

Last updated by Luo Yang 3 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#2143701

Hello,

I just noticed that when editing and saving a page that contains a view block all custom fields are updated for all pages containing the same view block with the values set for the page currently edited.

Exemple : if I edit page 751 containing view 22404 to update field wpcf-test-1 (simple checkbox) to 1 (checked) meta wpcf-test-1 is also set to 1 for page 1314 wich also contains view 22404 but that I did not edited.

I aslo tried to update other custom fields than those created with Toolset and thus can confirm it's also occurring for WPML meta (tested on _wpml_media_duplicate) and Divi meta (tested on _et_pb_page_layout).

This behavior is strange and quite annoying as it means it's impossible to use the same view on multiple pages in order to update it for all pages simultaneously while keeping different meta for each of them.

Is it a bug ? If not is there a way to avoid that ?

Thanks in advance for your help.

#2144409

Hello,

The problem you mentioned above is abnormal, please check these:
1) In case it is a compatibility problem, please deactivate all other plugins, and switch to WordPress default theme 2021, deactivate all custom PHP codes, and test again

2) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

3) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, also point out the problem page URLs and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#2145459

Thanks for the details, I am downloading the files, will update here if find anything

#2145497
view-block2.JPG

I can see the problem with your duplicator package, and I have tried these:
1) Add another new page "Test 3"
2) In the page content, add a new view block, choose the existed view "Latest video tutorials", see my screenshot view-block2.JPG
Save the page,
3) Change the value in custom field "test1", it works fine, and does not effect other pages.

So how do you add already existing view "Latest video tutorials" into other new pages?
Please provide detail steps to reproduce the same problem, thanks

#2145607
ts1.jpg

Thanks for the feedback Luo.

I do the same as your screenshot shows, then click on "Use view" and on "Edit Original View" (attached screenshot) before saving.

While doing it again in order to take the screenshot, I realized that you probably did not click on "Edit Original View" in your case and maybe not even on "Use view" so I tried again both way and can thus confirm that, if I do not click on "Use view" or click on it but not on "Edit Original View", the problem of the custom fields propagation does not occur.

Unfortunately doing it that way the view either does not display correctly at all (if not clicking "Use view") or fall back to default values for some of the loop settings (if clicking "use view only") on page "Test 2" on which I just add the view without editing it.

Then, if, after saving, I change loop settings on page "Test 1" some also change on "Test 2", like loop style for example, but other do not and it's the case for the number of columns and gap of the grid settings for default loop style which keeps default values on "Test 2" even if set to 2 columns gap 50 (or anything else than the default value of 3 / 25) on "Test 1".

If the initial view settings where applied correctly and all changes made to the view would propagate normally on all pages on which the view is included, I could eventually do it this way, even if not really the best solution as I would like our customer to be able to make changes to the view settings on any page on which it is included, but I actually need 2 columns grid with custom gaps (and that may change later on) on all pages and I can get it only on "Test 1" this way except if using custom CSS to force it on "Test 2" which our customer won't be able to do if he wants to make so change later.

Honestly, I think that, even if the "Edit Original View" button is clicked on all pages that do integrate the view, values of custom fields outside the view block should not propagate to other pages when one is saved.

Is there a way to avoid that or at least to get the view settings to propagate correctly when changed ?

#2146471

Thanks for the details, I have tried it again in my localhost, by these steps:
Create another new page, add a view block, add view block-> Use existing View-> Choose the view block, click button "Use view"(don't click button "Edit Original View"), it works fine.

But the problem occurs after click button "Edit Original View", can you confirm it in your website?

#2146539

Yes I confirm, it's the same on our website :

- If clicking only "Use View", custom fields work fine (meta are saved only for edited page) but view grid settings are not correctly applied.

- If clicking "Edit original view", grid settings are correctly applied but custom fields are saved for all pages including the view with the same method (Edit original view).

Do no hesitate to tell me if you need me to test something else.

#2146543

Thanks for the confirmation, I have escalated this issue, will update here if there is any news.

Currently, in other new pages, after added the view block, do not click the button "Edit Original View"

#2146659

Thanks for the feedback and the advice but I can't unfortunately as I need two columns and can't get them this way.

Until you find a fix, I'll have to do with a copy of the view for each page and updating all of them when changing something or replacing them by new copies if many changes to propagate. But that's ok, could be worse 🙂

#2147221

Currently, if you want to change the view block, you need to edit it in the original page, in other pages, don't click the button "Edit Original View"

#2147331

Thanks again for the advice, I did understand and won't click "Edit original view" but, as already told, part of the view settings set (or modified) in the original page is not applied to other pages this way, which actually also seems to be a bug.

It's the reason why, the only solution I have actually is to click "Edit copy" on each page I need to include the view in and then update or replace all view copies when a change is to be made. But that's ok for me as long as I can continue to build the website one way or another.

Maybe you want me to open another ticket for the view settings bug ? Just tell me if it's the case.

Have a nice weekend.

#2147341

I suggest you try these:
1) Create a content template, setup a new block view, change view's settings in this content template
2) In other pages, insert a content template block, choose above content template, see our document:
https://toolset.com/block-item/content-template/

#2147741

Wow, I did not think about using content templates for that but view settings and custom fields work perfectly that way. Thanks a lot and have a nice weekend.

#2149233

I have marked this thread to "Escalated" status, will update here if there is anything news.

#2149297

Ok, thanks.