Skip Navigation

[Resolved] Can not Edit View after update

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

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Noman 7 years, 2 months ago.

Assisted by: Noman.

Author
Posts
#491015

I am trying to update a view to one we used previously because it worked.
When I try to save the view I get an error message of:
The Loop Output cannot be saved because required elements are not in correct order.

This is a minimal example of Loop Output with mandatory elements that you can use as a reference:

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-layout-end]

Please fix the problem and click on Update again.

The previous view that worked was:

[wpv-posts-found]
<!-- wpv-loop-start -->
   <wpv-loop>
     [wpv-post-body view_template="flexsider-nav-thumbnails"][wpv-layout-start]
   </wpv-loop>
<!-- wpv-loop-end -->
[/wpv-posts-found]
[wpv-no-posts-found][wpml-string context="wpv-views"]<strong>No posts found</strong>[/wpml-string][/wpv-no-posts-found]
[wpv-layout-end]

While I am happy to configure future coding to meet a new layout standard, how do I turn that off for this existing live site?

By the way, if I adjust the view to meet the suggest layout standard, I get a lot of form code inserted that prevents the Javascript code from working properly on the slider.

For example,

<div id="wpv-view-layout-712-CATTRb5c041e59de81672a7b1d849506a3d5e" class="js-wpv-view-layout js-wpv-layout-responsive js-wpv-view-layout-712-CATTRb5c041e59de81672a7b1d849506a3d5e" data-viewnumber="712-CATTRb5c041e59de81672a7b1d849506a3d5e" data-pagination="{'id':'712','base_permalink':'/properties/58-acres-duck-land/?wpv_view_count=712-CATTRb5c041e59de81672a7b1d849506a3d5e&wpv_paged=WPV_PAGE_NUM','query':'normal','type':'disabled','effect':'fade','duration':'500','speed':5,'stop_rollover':'false','cache_pages':'enabled','preload_images':'enabled','preload_pages':'enabled','preload_reach':'1','spinner':'builtin','spinner_image':'<em><u>hidden link</u></em>','callback_next':'','manage_history':'enabled','has_controls_in_form':'disabled','infinite_tolerance':'0','max_pages':0,'page':1,'loop':{'type':'','name':'','data':[],'id':0}}" data-permalink="/properties/58-acres-duck-land/?wpv_view_count=712-CATTRb5c041e59de81672a7b1d849506a3d5e">

 
</div>
#491171

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi John,

Thank you for getting in touch with us. That shortcode format seems like from a very old Toolset plugin and you are upgrading it directly to latest release of Views.

1. Please make sure all other plugins are also updated in this site, other than Views.

2. [wpv-posts-found][/wpv-posts-found] is deprecated since Views v1.4 and replaced entirely by wpv-items-found:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-items-found

- It is not recommended to use this shortcode and it may cause problems with new features being added in future. So we would suggest to update your Views shortcode with the new loop structure and replace the old ones.

==== Please backup your database and website ===

You can also “find and replace” this shortcode name in your database:

Search for this: [wpv-posts-found]

And Replace it with:
[wpv-layout-start]
[wpv-items-found]

This plugin makes this process easier: https://wordpress.org/plugins/search-and-replace/

- I had some old views created 2 months ago and I can see all my Views having the latest shortcode structure starting from [wpv-layout-start], usually in such cases Toolset automatically replacing old shortcodes with new ones. But in your case since it's a big jump from a very old version it may have not been able to replace the old shortcodes.

3. Alternate method you can try is to do incremental update, which means first updating to an older release (example: v1.10) >> and then perform a second update to the latest version of Views.

Thank you

#491565

The search and replace feature wrecked the site.
However, I have been able to rebuild the pages with the new structure and eventually got the Javascript working again.

What I don't understand is why the updates didn't tell me these pages were at risk.
The only reason I knew we had a problem was because I tried to save changes and then the system complained about the structure and would not save things back the way they were.

One thing I sill struggle with is the way the system creates a new content template whenever I create a view. Am I always going to need to move HTML pieces into the content template? What if all I needed was a couple div's with a class in each?
I often find myself having to put messages in a View or Content Template or a Layout just to let me know where the point of origin is for a particular problem.

#492607

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

1. Loop Wizard.jpg
2. Field in Loop Output Editor.jpg

Hello John,

Thank you for your suggestions. The View plugin that was in your site was very old version and I think its difficult for the plugin to check backward compatibility to the level. Although I am not quite sure as well. Usually deprecated functions contains these checks for a certain time and then with time we entirely remove the oldest functions.

We really apologize for the problem it has caused.

And no, its not necessary to create a Content Template for each View, you can also add fields or your html content directly inside your View Loop without creating a Content Template for it. Please see attached screenshots.

Have a great day,
Thank you

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.