I am trying to: translate a page that contains a view
Link to a page where the issue can be seen: hidden link
I expected to be able to translate a view, or create a new view in a secondary language.
Instead, I got: I see a message "view not found" when editing the page in the secondary language (see attached image). The view still shows on the front end however, but the ordering is wrong.
There just doesn't seem to be any way to use views with a secondary language. I am able to create them, but once I save and refresh the page, I get the "view not found" message again.
I tried using only string translation as a last resort, but strings either don't show up for translation, or I translate them and the translations don't show up on the front end.
I'm using the Astra theme with toolset blocks and WPML, which are supposed to be compatible.
Please could you look into this issue?
Thanks
Hi,
Thank you for contacting us and I'd be happy to assist.
To be able to troubleshoot and reproduce this issue on my test website, I'll need to see exactly how this page and the view is set up and being translated.
Can you please share temporary admin login details, along with a link to a page where this error can be seen?
Note: Your next reply will be private and though no changes will be made on your website, please make a complete backup copy, before sharing the access details.
regards,
Waqar
Hi,
Thank you for waiting, while I performed some tests on my own website.
During this investigation, I couldn't reproduce this issue, since when I click to translate the page with a view into a secondary language, I'm taken to the advanced translation editor screen, as explained in this guide:
https://toolset.com/documentation/translating-sites-built-with-toolset/translating-content-templates-wordpress-archives-and-views/
But, the links that you shared from your website are from the translation post edit screens, which shouldn't be edited directly.
Can you please follow these steps:
1. Please make sure that all plugins are updated to the latest versions.
2. Instead of using the translation post's edit screen directly, please use the translation editor option, as shown in the guide I referenced earlier.
3. In case the issue still persists, it would be interesting to test this with all non-Toolset plugins disabled and a default theme like Twenty Twenty.
If it's fixed, you can start adding the disabled items, one-by-one, to narrow down to a possible conflicting one.
I hope this helps and please let me know how it goes.
regards,
Waqar
Hi,
Thanks for looking into this.
So if I understood correctly, I can't use post edit in a secondary language?
This would be very impractical, as I might need to have a different layout or view in a secondary language, as not all the pages are necessarily the same in both languages.
Seems a bit of a shame, as generally everything else works in post edit, except for views...
Hi,
Thanks for writing back and you've raised a good point.
I stand corrected about what I wrote about using the edit screen of the translated post/page in the secondary language.
On my test website with up-to-date plugins, I can edit the translated post/page in the second language without seeing the "view not found" message.
Here are the quick testing steps:
1. I created a page in the primary language English and created a post view.
2. Using the "WPML's Translation Editor" option I then translated it into a secondary language Dutch.
3. After translation completed I visited this translated post's edit screen and I was presented with the option to either create an independent copy of the original view or use the original one's translation editor.
Screenshot: hidden link
Please note that there is no error and I can edit or remove the existing view's block and other blocks, as needed too.
My recommendation would be to update all plugins and then repeat the same test on your website with a new page and view.
In case you're able to reproduce the same error message, you're welcome to share the exact steps and I'll report it accordingly.
regards,
Waqar
Hi,
I updated the plugins but I still get the same error.
I can get to step 3 too without issues. The problem happens afterwards.
If I click on "Edit original view" or "edit copy", I either get the "view not found" message or it just gets stuck (see screencap).
Thanks again for your help
Hi,
Thank you for waiting and I apologize for the delay in getting back on this.
Since I'm still not able to reproduce this behavior on my test website, it seems something specific to your website.
Would it be possible for you to share a clone/snapshot of this website?
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )
Note: I've set your next reply as private.
regards,
Waqar
Hi,
Thank you for waiting, while I performed some tests on your website's clone.
This investigation turned out to be more complex than expected since issue wasn't reproducible when only Toolset and WPML plugins were active.
I noticed that the issue only appears when the "Post Types Order" plugin is active and the "Auto Sort" option is checked in its settings.
Can you please confirm this by updating all the plugins and then disabling the "Auto Sort" option from the website?
regards,
Waqar
That was it! After unchecking "auto sort" in the Post Types Order plugin, I'm no longer getting an error in the views. Thanks so much for your help, you're the best!