User tests: Successful: Unsuccessful:
Pull Request for #25258 (comment).
With PR #25258 meta keywords have been removed from diverse forms and views.
This is a good thing.
But the fields in database tables still exist, have a NOT NULL
constraint and partly no default value, e.g. in the #__languages
table.
This leads to content language not being installed when installing a language, see #25258 (comment).
Furthermore I saw fields metakey
are still used by diverse sample data, so we can't just remove those columns, not yet.
So this PR removes the NOT NULL
constraint from metakey
columns where they are of type text
, because for such columns default values are not allowed in strict mode, and adds missing default value empty string to those columns where they are of type VARCHAR
, so things don't fail and stay BC.
Later when all metaky removal has been completed we can remove those columns from database tables with another PR, wherever appropriate (BC?).
On a current 4.0-dev installation, apply the changes in the update sql script 4.0.0-2020-02-08.sql
added by this PR e.g. with PhpMyAdmin or PhpPgAdmin, replacing #___
by your actual db prefix.
Install Persian language.
Result: Content language created, no notice like shown in comment #25258 (comment).
Verify that following still works:
Apply PR on a clean current 4.0-dev and then make new installation.
to 3. Same as for update above.
Code review/database check: All database columns for meta keywords have default value ''
where they are of type VARCHAR
and have no default and allow NULL
values where they are of type TEXT
.
Language installation test (step 2): No notice, and content language is created.
Other tests (step 3): Things work.
Code review/database check: There are some database columns for meta keywords having a NOT NULL
constraint and no default value.
Language installation test (step 2): Notice shown, and content language not created.
Other tests (step 3): Things work.
None.
Status | New | ⇒ | Pending |
Category | ⇒ | SQL Administration com_admin Postgresql Installation |
Labels |
Added:
?
|
I have tested this item
Thinking about it ... maybe I should change this to null values instead of empty strings? Is late here, I have to check tomorrow.
I did wonder about that but you're the sql guru
from https://dev.mysql.com/doc/refman/8.0/en/blob.html
BLOB and TEXT columns cannot have DEFAULT values.
You shall not trust gurus
I should not have looked into joomla.sql to see how it should be done ... is all wrong there. There is a PR which wants to fix that for staging, #17860 , but it it missing something, and the author seems not to be available anymore. Have pinged him yesterday. Let's wait a bit and give him time. For this PR here I will check if I can provide a correction, and if not I'll close it and make an issue.
@Quy Thanks for pointing me to that other PR. Clould you set back your test result to "not tested" for my PR here?
@alikon @brianteeman @Quy PR modified, descriptions and testing instructions updated. Ready for testing.
I have tested this item
rather urgent to get in as multilingual is dead fish. ;)
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-02-10 07:20:46 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
@brianteeman Done. I won't change the comments with update SQL scripts because we never do that for comments only.