Error: Field 'ordering' Doesn't have A Default Value - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Error: Field 'ordering' Doesn't have A Default Value

E

Ernst

SP Page Builder 2 years ago

Hi,

can't create a new page in SP Page Builder. After entering the page name and clicking on Save&Go, the error message

Field 'ordering' doesn't have a default value

is displayed. No chance to create new pages, whereas I have the same problem in several test installations of SPPB with the Helix and Qubic template. Joomla version is 4.3.0.

See screenshot: https://prnt.sc/w48HWLuoFgSL

Unfortunately I am totally blocked in my work :-(

Any help is very welcome.

Regards Ernst

0
4 Answers
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 2 years ago #114739

Hi there!

Thanks for your query.

Please go to the phpMyAdmin, load up your site's database and then open the schema for the xxxxx_sppagebuilder. (here xxxxx is your database table prefix )

https://prnt.sc/MhUD9dCC1E0z

In the table you'll see, it should mention a line for this column ( ordering).

https://prnt.sc/-9PaQWSbXmdz

Just set default value for colomn ordering and save.

https://prnt.sc/woMLzS9VW8ZD

Clearing your Joomla and browser cache is always important.

Please let me know if this solves the issue for you.

Best Regards

0
E
Ernst
Accepted Answer
2 years ago #114745

Dear Rashida,

thank you very much for the quick reply.

With your suggested solution, I was able to solve the problem. that's great.

But since Ii have some test installations, I have to do this several times :-(

Do you think your engineers will provide a fix for this in setup soon?

Best regards Ernst

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 2 years ago #114748

Hi Ernst,

It doesn't happen each time in general.

Personally, I never face this issue at my end. It's an issue with database I guess, sometimes it doesn't behave perfectly as somehow it misses the correct value.

Best Regards

0
E
Ernst
Accepted Answer
2 years ago #114751

Hello Rashida,

first of all, thank you for your explanation.

but I think if something works sometimes and doesn't work sometimes, it's usually worth a closer look. Since SQL is a standardized query language, every database should (theoretically) behave the same when it comes to simple database types.

Have therefore looked in the setup of the SPPB in the file install.mysql.utf8.sql to see how the SQL command for the 'ordering'column is defined. Looks like this:

'ordering' int(11) NOT NULL DEFAULT '0',

It seems to me that the default value in quotation mark '0' could be a problem, because actually numeric values are not set in quotation mark. This is confirmed by a SQL export of the database from phpMyAdmin. There the default value for the 'ordering'column is not output in quotes:

'ordering' int(11) NOT NULL DEFAULT 0,

So I think, give my answer to one of your engineers for insight with the advice not to put defaults for numeric columns in quotation marks.

And try it yourself, do a SQL export of the SPPB database on one of your test installations and compare it with the setup script.

Best regards Ernst

0