New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix install languages and discover extension for mssql and small fixes for other databases #14321
Conversation
569d4bc
to
d231e82
Compare
Tested on mysqli, using the Before patch, when installing Joomla, I can't install languages. After patch, I indeed can install languages but I get in CPanel 2 errors I can install languages but I get in CPanel
and, if I go to administrator/index.php?option=com_content
Same for Newsfeeds Manager Error also for other managers
|
Forgot to say: |
Which version of joomla do you use? Besides that, this errors are unrelated. This PR only fix stuff for install language queries/database. |
I used a staging clean install (multilang) and the errors only display when I modify the driver with As soon as I take off this modification, no more errors, even when your patch is applied. |
Hmm, I have mysql 5.7 and I do not see any errors. Please enable debug log in global configuration. (Logging Tab) Delete file if exist: Then try to generate above errors. |
Forgot to say that my database name is "strictmode" #
#<?php die('Forbidden.'); ?>
#Date: 2017-03-04 10:46:15 UTC
#Software: Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
#Fields: datetime priority clientip category message
2017-03-04T10:46:15+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:46:15+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:46:15+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:46:15+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:46:15+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.asset_id' isn't in GROUP BY
2017-03-04T10:46:15+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.asset_id' isn't in GROUP BY
2017-03-04T10:46:16+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:46:16+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:46:16+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:46:16+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:46:16+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.asset_id' isn't in GROUP BY
2017-03-04T10:46:16+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.asset_id' isn't in GROUP BY
2017-03-04T10:46:16+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:46:16+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:46:16+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.asset_id' isn't in GROUP BY
2017-03-04T10:46:16+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:46:16+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:46:16+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.asset_id' isn't in GROUP BY
2017-03-04T10:48:10+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:48:10+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:48:10+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.asset_id' isn't in GROUP BY
2017-03-04T10:48:10+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:48:10+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:48:10+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.asset_id' isn't in GROUP BY
2017-03-04T10:48:11+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:48:11+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.title' isn't in GROUP BY
2017-03-04T10:48:11+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.asset_id' isn't in GROUP BY
2017-03-04T10:48:12+00:00 INFO ::1 updater Loading information from update site #1 with name "Joomla! Core" and URL https://update.joomla.org/core/list.xml took 0.20 seconds
2017-03-04T10:48:12+00:00 INFO ::1 updater Loading information from update site #2 with name "Accredited Joomla! Translations" and URL https://update.joomla.org/language/translationlist_3.xml took 0.14 seconds
2017-03-04T10:48:13+00:00 INFO ::1 updater Loading information from update site #3 with name "Joomla! Update Component Update Site" and URL https://update.joomla.org/core/extensions/com_joomlaupdate.xml took 0.13 seconds
2017-03-04T10:48:14+00:00 INFO ::1 updater Loading information from update site #1 with name "Joomla! Core" and URL https://update.joomla.org/core/list.xml took 0.17 seconds
2017-03-04T10:48:50+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.name' isn't in GROUP BY
2017-03-04T10:48:50+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.name' isn't in GROUP BY
2017-03-04T10:48:50+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.name' isn't in GROUP BY
2017-03-04T10:48:50+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.name' isn't in GROUP BY
2017-03-04T10:48:50+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.asset_id' isn't in GROUP BY
2017-03-04T10:48:50+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.asset_id' isn't in GROUP BY
2017-03-04T10:48:51+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.name' isn't in GROUP BY
2017-03-04T10:48:51+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.name' isn't in GROUP BY
2017-03-04T10:48:51+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.asset_id' isn't in GROUP BY
2017-03-04T10:48:51+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.name' isn't in GROUP BY
2017-03-04T10:48:51+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.name' isn't in GROUP BY
2017-03-04T10:48:51+00:00 ERROR ::1 database-error Database query failed (error # 1055): 'strictmode.a.asset_id' isn't in GROUP BY |
Changing the database name has no effect. |
I think there are important differences between msql 5.5 and 5.7 |
That was it! If I take off |
Shall I therefore consider this PR as OK? |
Yes. This PR is OK, your errors is unrelated. Which sample data do you use on instalation? |
None. I have set up the site as multilingual. |
I have tested this item ✅ successfully on d231e82 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14321. |
Works with postgresql, but couldn´t test with mssql as installation could not be finalised. After choosing the Install Sample Data and pressing the Install-Button the program returns to the Overview tab. |
If you does not have latest version then samples data is broken. Try to install without samples. |
@csthomas I also tried without sample data and I am always using the current staging. |
Please edit 691 line in libraries/joomla/database/driver/sqlsrv.php
to
and in installation/model/database.php line 1144
to
Then you will see what query generate error. |
Then I get: Incorrect syntax near the keyword 'SET' ALTER DATABASE [joomla37] CHARACTER SET 'utf8' |
I know that error but it not stop installation. Normally it is hidden and installation go forward. |
The method looks like this:
|
Yes and it generates error which not stop installation. I want you to do not run this query. Type |
Ok, now I have
and the installation goes back to Tab Overview with no message. |
If you not try with this zip then may be this help: I do not know what going wrong. |
IIRC some days I had some php warning or notice which was displayed. It broke ajax results and installation stop. may be turn off display errors may temporary help. |
PHP Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "file:///C:/Program%20Files%20(x86)/Ampps/www/joomla37/plugins/fields/gallery/gallery.xml" in C:\Program Files (x86)\Ampps\www\joomla37\libraries\cms\installer\installer.php on line 1997, referer: http://localhost/joomla37/installation/index.php?view=site When I delete the respective line in joomla.sql installation works. So next I tried to install another language, but I get this error message: |
This is php 5.3 only. We can not use |
$ins = $this;
// Sort the array by value of subarray
usort(
$languages,
function($a, $b) use ($ins)
{
$ordering = $ins->getState('list.ordering');
if (strtolower($ins->getState('list.direction')) === 'asc')
{
return StringHelper::strcmp($a->$ordering, $b->$ordering);
}
else
{
return StringHelper::strcmp($b->$ordering, $a->$ordering);
}
}
); |
That works! |
OK, I'm adding that changes to PR. |
The gallery plugin should also be removed from the mysql and postgres installation files. |
I think it was removed in #14309 |
But the are still included in your patch. |
Yes because you used Patch tester which replace all joomla.sql file instead add only changes. If you download https://github.com/csthomas/joomla-cms/archive/sqlupdate_strict.zip then everything should be ok (this is a version of joomla where gallery has not been deleted yet) |
Mysql strict mode - install languages fix Postgresql - reinstall languages fix Mssql - install and reinstall and discover extension fix
5be011d
to
26cccca
Compare
I have rebased PR. Now it will work with Patch Tester too without mentioned problem. |
I have tested this item ✅ successfully on 26cccca This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14321. |
@infograf768 can you please test again so we have 2 successfully tests? |
@@ -537,7 +537,7 @@ public function update() | |||
|
|||
// Update an entry to the extension table | |||
$row = JTable::getInstance('extension'); | |||
$eid = $row->find(array('element' => strtolower($this->get('tag')), 'type' => 'language', 'client_id' => $clientId)); | |||
$eid = $row->find(array('element' => $this->get('tag'), 'type' => 'language', 'client_id' => $clientId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason we had strtolower and you take it off?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mysql compares string case-insensitive and strtolower()
do nothing, but on postgersql and mssql string is compared case-sensitive, so en-GB = en-gb
returns false. Text in table #__extensions
in element
column (language package) has upper case letters too.
This is fix for duplication after reinstall language.
I have tested this item ✅ successfully on 26cccca This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14321. |
RTC as there are 2 successfully Tests? |
Pull Request for Issue #9457 and related to #11763 which is incomplete.
Summary of Changes
Mysql strict mode - install languages fix.
Postgresql - reinstall languages fix, prevent double installation in db.
Mssql - install and reinstall and discover extension fix.
Additional changes:
Mysql column type TEXT can not have default value ''. It is ignored.
Source: https://dev.mysql.com/doc/refman/5.7/en/blob.html
So from others db I also removed default value for:
Testing Instructions
[MYSQL - strict mode]
[POSTGRESQL]
[SQLSRV]
Expected result
All above things works
Documentation Changes Required
None