Les langues: Anglais (English )Espagnol (Español )
Fuseau horaire: Europe/London (GMT+00:00)
Hi Gavin, sorry I seemed to have left you hanging while tied up in another thread. Let me repeat what I wrote in the chat:
That's clearly not right.
Are these templates that were generated (e.g. using the Loop Wizard) or are they ones you manually created and edited?
I would suggest you disable all plugins except Views and switch theme to twentynineteen and see whether they remain the same (i.e. has the underlying content of the templates been changed, or is it just when presenting them the issue appears).
Hello. They were generated using the wizard (only with one field to auto-generate the content template - then they were coded by hand). They looked okay to start with. It was only when re-opening the view that they displayed code. I 'think' that saving them they still work okay (will double-check). It's just reading them becomes a bit tricky. You think they'd display code for all of it and not just the single quotes...
I will try disabling and re-opening, re-creating, etc. and report back in due course.
Les langues: Anglais (English )Espagnol (Español )
Fuseau horaire: Europe/London (GMT+00:00)
Hi Gavin
Sorry, we are not progressing much here, can we quickly establish two things, after which I'll likely need a copy of the site for debugging given that you have already tested a minimal install.
1. is the data saved correctly and only being displayed problematically, or is it saved wrongly in the first place?
Can you use phpMyAdmin or similar to inspect the database content? Go to Toolset > Content Templates and identify the ID of the template used in your View, then check the entry for that in wp_posts, where you will see the post_content stores the content of the template (see screenshot).
2. Any errors or warnings in your debug.log?
Can I get a copy of your site (with Duplicator, or All-in-One WP Migration)?
I'll mark your next reply as private for you to share a link to the archive files.
Also... as you have the archive, etc. I will mention this here. I have a more pressing issue. I am happy to raise this as a separate support thread.
----
The block editor is not working. For my all post types I had set them to Classic Editor (which of course without the Classic Editor plugin means that it is HTML only). I now wanted a user to be able to use the Visual or Block Editor, so I switched a custom post type to use the Block Editor, which after taking some time to load, would only let me edit the title and a 'Classic Block'. I could not add any other blocks at all. I tried with other post types including the WordPress default post type.
I then tried installing the Classic Editor plugin to see if I could use the Visual classic editor. However, with Classic Editor set, no Visual option appeared when editing any post type.
So.. I did the usual. I deactivated ALL plugins and switched to the WordPress 2019 Theme, however the problem still persists. The Block Editor has only title and Classic block with no options to add new blocks, etc. I tried the Classic Editor Plugin but no visual editor option became available.
if I edit the content template in the View and then save the view it does then store the HTML codes in the database and the content template does not render correctly.
If I don't edit the content template in the view and save the view then the content template is not updated in the database and therefore still renders correctly.
Les langues: Anglais (English )Espagnol (Español )
Fuseau horaire: Europe/London (GMT+00:00)
Hi Gavin
I installed the duplicate locally and I can't see either of the issues you are reporting.
I looked at several of your Views, and identified the one your first screenshot was from, and they display entirely normally, no HTML entities visible.
I also went to Toolset > Post types and changed the settings for posts ("News") to use the Block Editor.
I then edited an existing post—it's expected to see the current content in a classic block—but I was able to add new blocks without any problems (screenshot).
Also, I'm not sure what you mean by your "of course" comment about the classic editor being HTML-only. When the post type is set to use the classic editor then both the Visual and Text tabs for the content are available as normal. No Classic Editor plugin required to change anything here.
So I don't think the site content or database are corrupted in any way, it looks to be problems occurring at the server level (given that I installed a replica of your site on a different server where it works normally).
The only thing of any note in your debug info is that you are using one of the latest PHP versions (7.3.7).
Does it make any difference if you change the PHP version to, say, 7.2?
The other site, although using a different theme, is on the same hosting and works fine... I can use block editor or classic switching between visual and text.