? ? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
8 Feb 2020

Pull Request for #25258 (comment).

Summary of Changes

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?).

Testing Instructions

Update

  1. 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.

  2. Install Persian language.
    Result: Content language created, no notice like shown in comment #25258 (comment).

  3. Verify that following still works:

  • Creating and editing banners and banner clients
  • Creating and editing contacts
  • Creating and editing articles
  • Creating and editing newsfeeds
  • Creating and editing tags

New installation

  1. Apply PR on a clean current 4.0-dev and then make new installation.

  2. to 3. Same as for update above.

Expected result

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.

Actual result

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.

j4-install-persian-language-notice

Other tests (step 3): Things work.

Documentation Changes Required

None.

avatar richard67 richard67 - open - 8 Feb 2020
avatar richard67 richard67 - change - 8 Feb 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Feb 2020
Category SQL Administration com_admin Postgresql Installation
avatar richard67 richard67 - change - 8 Feb 2020
The description was changed
avatar richard67 richard67 - edited - 8 Feb 2020
avatar richard67 richard67 - change - 8 Feb 2020
The description was changed
avatar richard67 richard67 - edited - 8 Feb 2020
avatar richard67 richard67 - change - 8 Feb 2020
The description was changed
avatar richard67 richard67 - edited - 8 Feb 2020
avatar richard67 richard67 - change - 8 Feb 2020
Labels Added: ?
avatar richard67 richard67 - change - 8 Feb 2020
The description was changed
avatar richard67 richard67 - edited - 8 Feb 2020
avatar richard67
richard67 - comment - 8 Feb 2020

@brianteeman Done. I won't change the comments with update SQL scripts because we never do that for comments only.

avatar Quy Quy - test_item - 8 Feb 2020 - Tested successfully
avatar Quy
Quy - comment - 8 Feb 2020

I have tested this item successfully on 2723a32


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27854.

avatar richard67
richard67 - comment - 8 Feb 2020

Thinking about it ... maybe I should change this to null values instead of empty strings? Is late here, I have to check tomorrow.

avatar brianteeman
brianteeman - comment - 8 Feb 2020

I did wonder about that but you're the sql guru

avatar alikon
alikon - comment - 9 Feb 2020

from https://dev.mysql.com/doc/refman/8.0/en/blob.html

BLOB and TEXT columns cannot have DEFAULT values.

avatar richard67
richard67 - comment - 9 Feb 2020

You shall not trust gurus ?

avatar richard67
richard67 - comment - 9 Feb 2020

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?

avatar richard67 richard67 - change - 9 Feb 2020
The description was changed
avatar richard67 richard67 - edited - 9 Feb 2020
avatar richard67 richard67 - change - 9 Feb 2020
The description was changed
avatar richard67 richard67 - edited - 9 Feb 2020
avatar richard67 richard67 - change - 9 Feb 2020
The description was changed
avatar richard67 richard67 - edited - 9 Feb 2020
avatar richard67 richard67 - change - 9 Feb 2020
The description was changed
avatar richard67 richard67 - edited - 9 Feb 2020
avatar richard67 richard67 - change - 9 Feb 2020
The description was changed
avatar richard67 richard67 - edited - 9 Feb 2020
avatar richard67
richard67 - comment - 9 Feb 2020

@alikon @brianteeman @Quy PR modified, descriptions and testing instructions updated. Ready for testing.

avatar infograf768 infograf768 - test_item - 9 Feb 2020 - Tested successfully
avatar infograf768
infograf768 - comment - 9 Feb 2020

I have tested this item successfully on f08bcf4


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27854.

avatar infograf768
infograf768 - comment - 9 Feb 2020

rather urgent to get in as multilingual is dead fish. ;)

avatar Quy Quy - test_item - 9 Feb 2020 - Tested successfully
avatar Quy
Quy - comment - 9 Feb 2020

I have tested this item successfully on f08bcf4


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27854.

avatar Quy Quy - change - 9 Feb 2020
Status Pending Ready to Commit
avatar Quy
Quy - comment - 9 Feb 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27854.

avatar rdeutz rdeutz - change - 10 Feb 2020
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: ?
avatar rdeutz rdeutz - close - 10 Feb 2020
avatar rdeutz rdeutz - merge - 10 Feb 2020

Add a Comment

Login with GitHub to post a comment