Lexicon entry error

Summary

Hi, I’m trying to add a new entry to our lexicon to accommodate a revision to a current template. I’m getting an error (“An error occurred while trying to save the Lexicon Entry.”) The entry is not recorded.

Step to reproduce

  1. Navigate to “Translations” namespace, “default” topic, and “en” language.
  2. Click the “Create Entry” button.
  3. Fill out the “Create Entry” form:
    • Name: foo
    • Namespace: translations
    • Topic: default
    • Language: en
    • Value: foobar
  4. Click “Save”

Observed behaviour

After clicking “enter” I get an error pop-up reading:
“Error: An error occurred while trying to save the Lexicon Entry.”

Expected behaviour

Typically, it just registers the entry … then I move on to the other language (in this case French) and repeat.

Environment

MODX Revolution 2.8.1-pl
PHP version: 8.3.14
Database client version: libmysql - mysqlnd 8.3.14
Server version: 8.0.40 - MySQL Community Server - GPL

It’s unclear what causes this error message to appear.
The processor that is called when the “Save” button is clicked is quite simple and just creates a new modLexiconEntry object and tries to save it to the database table mod_lexicon_entries.

Does the rest of your site still work as usual?
Does anything (related) get added to the MODX error log when the saving fails?


You use a quite new version of PHP for a relatively old version of MODX 2.x.
Maybe try upgrading to the latest version of the MODX 2 branch to see if this fixes the issue.

The problem could also be with MySQL 8 as documented in this issue on Github:

Maybe take a look at the database table modx_lexicon_entries and make sure that the columns editedon and createdon allow NULL values.

Thanks Harry, that gave me some stuff to check on. I still haven’t figured out the issue, but was able to fix the issue temporarily by inserting the values into the database through phpMyAdmin. Not ideal, but gets me through this latest request from an editor.
I’m hoping to get together with our developer to explore this further. I usually rely on him to stop me from doing anything stupid!
Thanks again, and I’ll post when we figure out what the issue is.