Jump to content

If either the CKeditor or TinyMCE editor fails to load scripts or config does the field value not load from the DB?


gornycreative
 Share

Recommended Posts

EDIT: I changed the title to reflect the ultimate question...

I have run into a problem, and any suggestions or assistance as to how I can track down the issues that led up to this situation would be helpful.

I had a multisite setup in draft and debug mode. One site had content for some time, others were just having structure built out.

I usually ran upgrades from a central codebase for wire and modules as well - have not had any issues for years.

The upgrade process at some point in a recent iteration failed. I should have made independent backups of all the site DBs before, but I've never had data rows disappear like this.

After an upgrade, the field_body for a number of pages disappeared. The rows completely vanished. They were originally TinyMCE inputfields.

It is likely that I added the CKEditor inputfield when it was released and removed the TinyMCE inputfield without changing the setting on those fields on that particular site. Is it possible that this caused those field_body rows to get deleted? Because no inputfield type would have been set?

I also had issues with field_title data rows that included apostrophes that were unescaped. I had to manually query and fix those as they weren't showing up on the admin side - I'm guessing this has something to do with how text inputfields have been hardened recently.

Luckily I have older backups and haven't completely lost the data, but I have often wondered about how core upgrades are done with processwire.

Are there certain DB scripts that are automatically run when a version change is detected? It seems like the version changes just get updated without a lot of fanfare. I know on wordpress multisite it generally would need to rerun upgrade scripts for each site in the environment.

Edited by gornycreative
Improve the question title.
Link to comment
Share on other sites

Okay, now it gets weirder.

I tried running an insert command to bring the old CKeditor data back.

Now it won't display the data at all on the back-end (the field textarea even after I switch it to textarea is completely blank) but the data exists in the row and I can see it on the front-end.

Any hints as to what is going on would be helpful - running 3.0.213 (latest dev)

Thanks,

J

Link to comment
Share on other sites

Looking into it further it seems that CKeditor had an old settings js path on that field and as a result it wasn't loading the editor but it was further down the editing form so I didn't see it.

Would that prevent the body field contents from loading?

When I saved to fix the title issue, would an empty body tag remove the row from the fields table?

I didn't think to see if the editor successfully loaded. It didn't occur to me that the value of the form field was empty if the editor failed to load, but I suppose that makes sense.

Link to comment
Share on other sites

  • gornycreative changed the title to If either the CKeditor or TinyMCE editor fails to load scripts or config does the field value not load from the DB?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...