This ticket follow my previous ticket "Content broken with the last version of view 3.0.1". It has been marked as solved but it's not.
After some tests I still don't understand why my content is broken after the update.
Here is my problem :
I have posts where I have inserted some Gutemberg View Bloc. There are more than 1 view bloc per post and I use the function offset and limit on each.
After the update to View 3.0 my posts in the front-office looks good but... If I want to edit a post in the editor there is an error. The first View block show the message "This block contains unexpected or invalid content." I can resolve or convert to HTML. If i convert I lost my filter, offset and limit setting for this view. The biggest problem I have is that the other view blocks are deleted, they are not there anymore. My paragraphs inserted between the View block are deleted too.
Moreover i noticed if I add some content after the last View block this content is not deleted. It looks like the content between the 1st view block to the last one is mixed and deleted after in the wordpress editor.
To sum up : the new View system introduced in the 3.0 do not convert my content properly. I think there is a bug.
However, I am not sure how that was the conclusion of the problem since what you mention here on your new ticket and there on the old ticket's first comment is totally unrelated to any slug in Views shortcodes, it instead complains that there is an error on blocks in edit post screens:
"This block contains unexpected or invalid content."
Generally, this was only to be solved like this:
1. Attempt block recovery from the "3-dot" menu on the side of the block.
2. If that does not work, check if it works after purging cache (if any)
3. If that also does not work, or the issue comes back after it initially disappears, please report this issue to us.
Can you try these steps?
In case it works, and in case you started using Blocks with the beta versions, or very early stable release, this is likely the issue, and it should be solved with the first step above listed.
Do not CONVERT, do "ATTEMPT TO RECOVER"
This should only happen on named "older" contents made with the beta, or early releases of the blocks features.
If that does not work, or I miss some detail please if possible provide me with a copy of the site so I can locally check that and eventually find the issue and solution. https://toolset.com/faq/provide-supporters-copy-site/
Yes don't take attention to the slug problem because it's a mistake from me and it's not linked to this problem.
First of all I've disabled all plugin except Toolset so It's not a compatibility problem.
I tried the 3 dots and attempt to recover : when there is only 1 view on the page it works, but when I have more than 1 view block I still have the problem. I can recover the 1st view but the content after and the other views are missing (deleted) in the editor, so if I save or WordPress autosave the post I lost most part of my post.
All my views and view templates are new from late 2019, it's not old content.
Ok, can you please send me a copy of the site, possibly in a "broken" state previous to recovery attempt?
Or even better if you have a copy of the still working site, and can instruct us what to do to "break" it, in both cases, we can take a look and see what causes this so to fix it.
There are over 40 plugins active on this website, are you sure none of them is causing the issue?
Because locally I can't spot the issue, but that might be due to missing a link any backend Post where I see the issue.
I found a few posts they have Views inserted but those are added as ShortCodes and work perfectly.
Can you elaborate where on the duplicate Database I see the issue?
OK, I found that but there is only one View there, and the suggested workaround as elaborated before solved the issue.
The View in question there is "RASM Liens Annexes List"
I clicked on the 3 dots, selected attempt recovery, and that resolved the issue.
But this view uses neither offset or limit so I suspect we are not talking about the same content.
When I fix the view and reload that post, this breaks again because actually the post can't save.
It should hence be due to the early versions of last year that caused such issues, which are now resolved, but since the post can't be saved to start with (Updating failed. Error message: The response is not a valid JSON response.), when "attempt the recovery" that does not stick but reverts to previous (broken version)
I've seen there are some 60 JS errors in that page, one of them being an error of View trying to save a View <div class="wp-block-toolset-views-view-editor ">[wpv-view name="liens-annexes-list" numero="1"]</div> instead of <div class="wp-block-toolset-views-view-editor ">[wpv-view name="liens-annexes-list"]</div>
All API calls also seem to fail and return errors in the console.
But I cannot really test on this testing site because even just activating another theme redirects to your live site.
Can you provide me a duplicate fabricated with https://toolset.com/toolset-support-policy/ so to avoid this?
It seems there are customizations in place to redirect which must be stored somewhere in the database.
Maybe it is possible to avoid those with a full duplicate.
I managed to identify the problem and then reproduce it on my own test site.
It occurs where you have a View with a Query Filter that takes some value from a shortcode attribute, and where the View block passes a value to the View via the shortcode attribute.
I don't think you would have such a problem were you to insert the Views in a shortcode block, for example, which I note you have also done on the same post I was editing.
But you may have used this technique in many places and it is too much for you to replace such instances, so I don't know if that is a viable workaround while waiting for the developers to produce a fix.
In any case, I'm escalating this so that they can take a look, and I'll let you know what happens.