Save error: "Field 'context' doesn't have a default value" Topic is solved

Need help with the Administration of your Joomla! 5.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
pborga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon May 06, 2024 4:03 pm

Save error: "Field 'context' doesn't have a default value"

Post by pborga » Mon May 06, 2024 4:41 pm

Sorry to intrude, but I think only you can help me!
When I try to use the additional fields and save this is what I get "Save failed with the following error: Field 'context' doesn't have a default value". Can you help me find out what I'm doing wrong?
Database version 10.6.17-MariaDB-cll-lve-log
PHP version 8.2.18
Joomla! version Joomla! 5.1.1-dev Development [ Kudumisha ] 16-April-2024 16:59 GMT
Last edited by toivo on Tue May 07, 2024 1:44 am, edited 2 times in total.
Reason: mod note: split from https://forum.joomla.org/viewtopic.php?f=839&t=1008919. Please create your own new topic in future. Retitled

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17510
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Save error: "Field 'context' doesn't have a default value"

Post by toivo » Tue May 07, 2024 1:53 am

Welcome to the Joomla forum!

More information is required.

pborga wrote:
Mon May 06, 2024 4:41 pm
When I try to use the additional fields and save
Are those custom fields related to articles, categories or users?

Are you using the latest Nightly Build of Joomla 5.1.1-dev, built on 7 May, 2024?

Use phpMyAdmin from the cPanel provided by your host, or in your workstation, if this is a localhost site, browse the database table _fields, locate the title of the custom field in question in the column 'title' and check the contents of the column 'context'.
Toivo Talikka, Global Moderator

pborga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon May 06, 2024 4:03 pm

Re: Save error: "Field 'context' doesn't have a default value"

Post by pborga » Tue May 07, 2024 7:23 am

Good morning toivo! pborga Joomla! Fledgling has woken up and with the help of google translate I reply to your kind reply yesterday:
1. Additional fields for use with articles;
2. Joomla_5.1.1-dev-Development-Update_Package of ‎Tuesday ‎7 ‎May ‎2024, ‏‎05:27:04;
3. Currently the phpMyAdmin tables on Host.it: fields, fields_categories, fields_groups, fields_values ​​are completely empty.
Thanks for everything and have a nice day!!!

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17510
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Save error: "Field 'context' doesn't have a default value"

Post by toivo » Tue May 07, 2024 7:36 am

It is not clear if you are just trying to create a new custom field or if you are filling in a custom field while editing an article.

Did you install Joomla originally, did you download the first version from https://downloads.joomla.org or did you download the full development version?
Toivo Talikka, Global Moderator

pborga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon May 06, 2024 4:03 pm

Re: Save error: "Field 'context' doesn't have a default value"

Post by pborga » Tue May 07, 2024 8:17 am

Step by step I came from an initial installation of Joomla 3 and subsequently updated from https://developer.joomla.org/nightly-builds.html. I don't know what happened, but as I wrote the four fields tables are empty. Three days ago I uploaded Joomla_5.1.1-dev-Development-Full_Package with Filezilla.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17510
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Save error: "Field 'context' doesn't have a default value"

Post by toivo » Tue May 07, 2024 8:31 am

pborga wrote:
Tue May 07, 2024 8:17 am
Step by step I came from an initial installation of Joomla 3 and subsequently updated from https://developer.joomla.org/nightly-builds.html. I don't know what happened, but as I wrote the four fields tables are empty.
It sounds like one of Joomla updates may have failed along the way. Have you checked the update log administrator/logs/joomla_update.php?

pborga wrote:
Tue May 07, 2024 8:17 am
Three days ago I uploaded Joomla_5.1.1-dev-Development-Full_Package with Filezilla.
If you uploaded the full Joomla 5.1.1-dev package on the top of an existing Joomla filesystem, rather than using the Joomla! Update or installing the full package in an otherwise empty folder and a new database schema, the results would be unpredictable.
Toivo Talikka, Global Moderator

pborga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon May 06, 2024 4:03 pm

Re: Save error: "Field 'context' doesn't have a default value"

Post by pborga » Tue May 07, 2024 10:59 am

My site https://www.pborga.it works perfectly for me, I just can't use the additional fields.
Anyway, many thanks!!!

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

Re: Save error: "Field 'context' doesn't have a default value"

Post by ceford » Tue May 07, 2024 12:29 pm

In the #__fields and the #__fields_groups tables the context columns need to have the default value set to an empty string. You can use phpMyAdmin to find the tables and columns. Select Change and make sure the Default is set to As Defined and the defined value is empty.

pborga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon May 06, 2024 4:03 pm

Re: Save error: "Field 'context' doesn't have a default value"

Post by pborga » Tue May 07, 2024 4:13 pm

Dear Ceford! I can't figure it out, I'm asking too much if you can send me the 4 tables: fields, fields_categories, fields_group and fields_values ​​with a single first line. Thanks in advance.
Pierantonio Borga - https://www.pborga.it

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

Re: Save error: "Field 'context' doesn't have a default value"

Post by ceford » Tue May 07, 2024 4:43 pm

That won't help at all! Do you have phpMyAdmin? Have you used it to examine your database?

pborga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon May 06, 2024 4:03 pm

Re: Save error: "Field 'context' doesn't have a default value"

Post by pborga » Tue May 07, 2024 5:57 pm

I can use phpmyadmin and I can see the database and its tables but I am not able to adjust the four fields tables.

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

Re: Save error: "Field 'context' doesn't have a default value"

Post by ceford » Tue May 07, 2024 6:45 pm

In phpMyAdmin, the list of your tables should have Browse and Structure as the first two buttons in the row of buttons. For the #__fields table select the Structure button. That should give you a list of fields in the table. One of them is 'context' - over to the right select the Change button. Set the Default value as I described previously. If you can't do any of that please say exactly why and use screenshots if necessary.

pborga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon May 06, 2024 4:03 pm

Re: Save error: "Field 'context' doesn't have a default value"

Post by pborga » Wed May 08, 2024 11:36 am

The forum won't load the screenshot for me!

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

Re: Save error: "Field 'context' doesn't have a default value"

Post by ceford » Wed May 08, 2024 3:33 pm

To post a screenshot use the Attachments button beneath the post data entry field.

Is your problem fixed?

pborga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon May 06, 2024 4:03 pm

Re: Save error: "Field 'context' doesn't have a default value"

Post by pborga » Wed May 08, 2024 6:24 pm

I'm still at sea; not knowing the English language the problem is double! Thank you ...

pborga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon May 06, 2024 4:03 pm

Re: Save error: "Field 'context' doesn't have a default value"

Post by pborga » Wed May 08, 2024 6:41 pm

If I try to attach a screenshot the "forum" responds like this!
Joomla forum is about Joomla CMS. Please do not link to non-Joomla websites as it can be considered spam and lead to a ban. Please avoid using AI to generate your answer, as our forum encourages authentic human interactions. Thanks for your cooperation!

pborga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon May 06, 2024 4:03 pm

Re: Save error: "Field 'context' doesn't have a default value"

Post by pborga » Wed May 08, 2024 6:43 pm


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

Re: Save error: "Field 'context' doesn't have a default value"

Post by ceford » Wed May 08, 2024 7:37 pm

This table structure is significantly different from the current nightly build! The Nightly Builds site does warn you that the builds are for testing only! You have missed out executing sql queries along the way and there is no knowing what other tables are not up to date. You could just delete the four empty #__fields... tables and use the queries in installation/sql/mysql/supports.sql from line 133 to line 230. The chances are you will meet more problems tomorrow, next week or next month.

You really need to be using the Joomla 5.1 Stable version. I recommend you install that locally on your laptop or
workstation and completely rebuild your site there using Joomla core components as far as possible.

pborga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon May 06, 2024 4:03 pm

Re: Save error: "Field 'context' doesn't have a default value"

Post by pborga » Thu May 09, 2024 6:18 am

Eureka ceford! I followed your advice: I reinstalled Joomla 5.1.0, deleted the four "fields" tables and learned a new function to reinstall them with phpmyadmin. Thanks so much and...

pborga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon May 06, 2024 4:03 pm

Re: Save error: "Field 'context' doesn't have a default value"

Post by pborga » Thu May 09, 2024 3:49 pm

ceford wrote:
Wed May 08, 2024 7:37 pm
This table structure is significantly different from the current nightly build! The Nightly Builds site does warn you that the builds are for testing only! You have missed out executing sql queries along the way and there is no knowing what other tables are not up to date. You could just delete the four empty #__fields... tables and use the queries in installation/sql/mysql/supports.sql from line 133 to line 230. The chances are you will meet more problems tomorrow, next week or next month.

You really need to be using the Joomla 5.1 Stable version. I recommend you install that locally on your laptop or
workstation and completely rebuild your site there using Joomla core components as far as possible.
Eureka ceford! I followed your advice: I reinstalled Joomla 5.1.0, deleted the four "fields" tables and learned a new function to reinstall them with phpmyadmin. Thanks so much and...
Top

pborga
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon May 06, 2024 4:03 pm

Re: Save error: "Field 'context' doesn't have a default value"

Post by pborga » Mon May 13, 2024 8:00 am

ceford wrote:
Wed May 08, 2024 7:37 pm
This table structure is significantly different from the current nightly build! The Nightly Builds site does warn you that the builds are for testing only! You have missed out executing sql queries along the way and there is no knowing what other tables are not up to date. You could just delete the four empty #__fields... tables and use the queries in installation/sql/mysql/supports.sql from line 133 to line 230. The chances are you will meet more problems tomorrow, next week or next month.

You really need to be using the Joomla 5.1 Stable version. I recommend you install that locally on your laptop or
workstation and completely rebuild your site there using Joomla core components as far as possible.
Many thanks for your help in solving the error and... see you next time!


Post Reply

Return to “Administration Joomla! 5.x”