0

At a total loss as to what is the cause of this error. The field was added to a Message Notify template entity. It is basically used as a token in emails sent using that module. The only place in my custom code that i use this field is to set its value from a value collected in a modal form. When submitting the modal; this error occurs.

The crazy part of this is that i have removed the field from the entity (so no longer exists in visible config in the site). I have also commented out the 1 line of code that refers to this field. After a db search the only tables to reference this field are config_snapshot and config_import. There were entries there for the field which i removed and the only records which remain are for the bundles which used to hold this field. Can't find any reference to what these tables are for but guessing they are only records of past import and not actively used.

To add to the crazy, this all works fine on my local dev copy of the site.

I have run cron and cr numerous times.

Any hints?

2
  • You might find hints in the call stack of a full error message. getTranslatedFields() is a protected method which is called by the public get() method, which has as only argument the field name. Which function is on 3rd position of the call stack and where it is getting the argument from?
    – 4uk4
    Commented Jul 14, 2021 at 8:57
  • Had tried to get call stack to print but wouldn't show for that error (shows in logs for other errors). Anyway, my client restored the db (old) from the production server and we ran cim to get latest config - and this solved the issue. After a year of doing numerous cim on various projects i was comfortable thinking that this was the definitive defn of the site's config - but possibly it isn't. :(
    – liquidcms
    Commented Jul 14, 2021 at 15:06

1 Answer 1

0

I restored an old db (from the live site) and reran drush cim to get the config which should have been in the staging site (which was showing this error) - and this solved our problem. Very odd that i couldn't find a reference to this field in the db or in code and odd that cim didnt fix it until i ran it on an older db.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.