I am trying to: Save a POST that is parent of a CPT call Map Markers
Link to a page where the issue can be seen: hidden link
I expected to see: No errors
Instead, I got: The following error:
Fatal error: Call to a member function get_language_for_element() on null in /homepages/16/d264773106/htdocs/ComaBeba2/wp-content/plugins/types/vendor/toolset/types/embedded/includes/wpml.php on line 522
This is follow-up of this closed ticket: https://toolset.com/forums/topic/fatal-error-related-to-wpml-when-it-isnt-installed/
Error message is different than the one mentioned in the response from Beda in a prior ticket to that one (although possibly related).
Error occurs when saving a POST (a restaurant review) that is a parent of a CPT called Map Markers (locations of the restaurant reviewed).
Clues:
1. The error only occurs when saving a POST connected to a child CPT Map Marker
2. If there is a single child connected to the POST (parent) the error occurs when an change is made to the WordPress EXCERPT field. If you then save the post without a change to that field, the save occurs as intended (no error).
3. The error appears to ALWAYS occur when saving a file with TWO or more children connected regardless of whether any changes were otherwise made to any field or taxonomy or post content.
Possibly related I have noticed on at least one occassion that when I disconnect a child from a parent in this situation I get an error when saving the child CPT Map Marker. It is the identical error as above except that the line number if 574 (rather than 522).
I am totally baffled by this one. I hope you can help.
Supplement: I could have sworn I had done this before related to this error but I now have a new clue. When I deactivate Polylang and then go to save a POST connected to two children the file saves as it should without an error. When I activate Polylang I begin getting the error again when saving a POST connected to two children (or more).
Hi, I'll be glad to take a look. I'll need to install the Duplicator Pro plugin on your site to create a clone I can use for debugging, or I can work from a database dump and a backup of your themes and plugins directories. The User account you provided in the details here is not permitted to access the plugins page, so I can't upload it myself. I'm activating a private reply field where you can share a download link. If you'd prefer to open up access to the plugins page, that's fine too.
Christian: Thanks for quick reply. Please be advised that this site is very big (1,000 or more pages, 2 languages, 30,000 images times the number of thumbnails, perhaps 150,000 or more, lots of taxonomies so the database is huge too). Also, it's a six-site multisite install (each city is a different sub-site, using directories). Completely duplicating site would likely be overkill, especially images.
I made a database backup today using UpdraftPlus (*.gz format) and have zip backups made earlier today of plugins and themes.
Can you use those Gzip files?
Please provide guidance on how to proceed. I'll put those file into the cloud folder in the meantime.
Thanks
Ken
Thanks, I have downloaded these backups and I'll try to get a local multisite up and running with these assets. I'll update you as soon as possible.
Okay I have been running some tests, and the first thing I noticed was that Polylang Pro was out of date. I don't have the latest pro version, but I was able to deactivate the old one and install the basic Polylang v 2.3.8. I'm not seeing the same error now when saving an updated excerpt, and I'm also able to successfully save a Post with more than one child Map Marker. Is it possible for you to update to Polylang Pro 2.3.8? If possible, please upload a copy so I can run some additional tests. I will activate a private reply field so you can provide a download link. The fields may say "duplicator package" but any download link will be fine.
Thanks for the extra information, I'll stand by for your next update. Private reply fields are available again here.