User creation error: "Field 'last_name' doesn't have a default value" and 4.2.9 installation error "JSON.parse: unex.."

Need help with the Administration of your Joomla! 4.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
SaritaVA
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Mar 18, 2023 4:54 pm

User creation error: "Field 'last_name' doesn't have a default value" and 4.2.9 installation error "JSON.parse: unex.."

Post by SaritaVA » Sat Mar 18, 2023 5:38 pm

Hi,
When I go to create a new user and save, or edit a user and save, I get error "Save failed with the following error: Field 'last_name' doesn't have a default value". I don't have a last_name field in the user form. I saw on another ticket it could have been a carry over from Joomla 3 database, but I also didn't have a last_name field for J3 either. Just the default stuff. I'm on 4.2.9 and just moved over to J4 last week. Fortunately, I just get the error and the profile does save. However, the email to the user doesn't trigger.

When I go to the database and search _users I don't see a header with last_name in the table. Not sure if there's another table to look for.

Last week on 4.2.8 I was able to edit two user profiles without an error. A few days ago I upgraded to 4.2.9 AND moved up from ACYMailing 5 to ACYMailing 8, which does have an optional last_name field we were using. I've deleted those fields from the component, and deleted the rows from within the myPHPAdmin tables.

I saw on another similar ticket to reinstall 4.2.9 completely. I did, but also got this error: "JSON.parse: unexpected character at line 1 column 1 of the JSON data" It seems to have updated as the banner shows 4.2.9 in the top right corner. I'm not sure if this is related.

Last thing I did was to go to the J4>System>"Maintenance: Database" and update the structure for "Joomla CMS
Joomla! 4 Content Management System." It has a green button that says no problems and I didn't see any improvement after doing this.

Thanks for any advice!

User avatar
ceford
Joomla! Ace
Joomla! Ace
Posts: 1582
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: User creation error: "Field 'last_name' doesn't have a default value" and 4.2.9 installation error "JSON.parse: unex

Post by ceford » Sun Mar 19, 2023 10:21 am

Problem 2: JSON.parse - update depends on JavaScript and this message can arise when the server side crashes and sends back an html error message instead of a JSON encoded message. You can go to System / Joomla and select the Check for Updates button - on second load it will offer a Reinstall Joomla Core Files button. Try it to see if the problem has gone away.

Problem 2: Joomla does not record first and second names so that must be related to the ACYMailing extension. You should ask the provider for help. My suggestion: uninstall and then install again the latest version. Then with phpMyAdmin look for the ACYMailing tables and find the first name / last name columns. It makes sense they should not have default values because they are usually required. But there are people with only one name! So you could set the default values to NULL. But like I said - ask ACYMailing before doing anything.


Post Reply

Return to “Administration Joomla! 4.x”