?
avatar Stevec4
Stevec4
3 Aug 2021

Steps to reproduce the issue

Using Joomla update - I uploaded 3.10 RC full update to a 3.9.27 installation and received the following SQL warning

Expected result

Installation without warnings

Actual result

Warning
JInstaller: :Install: Error SQL Duplicate entry '496' for key 'PRIMARY'
Files Update: SQL error file DB function failed with error number 1062
Duplicate entry '496' for key 'PRIMARY'
SQL =
INSERT INTO `#__extensions` (`extension_id`, `package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(496, 0, 'plg_quickicon_eos310', 'plugin', 'eos310', 'quickicon', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);

1 problem was detected when checking the DB

System information (as much as possible)

PHP Built On | Linux
Database Type | mysql
Database Version | 5.5.5-10.2.39-MariaDB-log
Database Collation | utf8_general_ci
Database Connection Collation | utf8mb4_general_ci
PHP Version | 7.4.19
Web Server | Apache
WebServer to PHP Interface | cgi-fcgi
Joomla! Version | Joomla! 3.10.0-rc1 Release Candidate [ Daraja ] 25-July-2021 11:08 GMT
Joomla! Platform Version | Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

Additional comments

Selecting FIX the DB updated the SQL to ver 3.10
Database schema version (in #__schemas): 3.10.0-2021-05-28.

avatar Stevec4 Stevec4 - open - 3 Aug 2021
avatar joomla-cms-bot joomla-cms-bot - change - 3 Aug 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Aug 2021
avatar richard67
richard67 - comment - 3 Aug 2021

@Stevec4 The error is caused by the last SQL update here https://github.com/joomla/joomla-cms/blob/3.10-dev/administrator/components/com_admin/sql/updates/mysql/3.10.0-2021-05-28.sql using a hard-coded ID value and not leaving away the ID so the auto-increment would be used. This caused the statement not to succeed, and since it does not change database structure it has also not been run by the "Fix" button, which only fixes data structure changes. => Ping @zero-24 for information.

Therefore, to make your update to 3.10 RC complete, please run the following SQL statement e.g. in phpMyadmi, replacing the "#__" by your actual table prefix:

INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(0, 'plg_quickicon_eos310', 'plugin', 'eos310', 'quickicon', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);

This will complete the installation of the End Of Service notification plugin.

You should do that if you plan to use that 3.10 RC 1 for developing your real life site.

If you only did that update to 3.10 RC for testing purpose and not plan to use the updated site for a real production site, you don't need to do that.

I will meanwhile prepare a fix so in future updates from 3.9.x to the next 3.10 RC 2 will not have that problem anymore.

avatar richard67
richard67 - comment - 3 Aug 2021

@Stevec4 P.S.: Could you check e.g. with phpMyAdmin or in the extension manager in backend and report back which extension uses the record with extension_id= 496? Please report back name, type, element, folder and client_id of this extension. Thanks in advance.

avatar Stevec4
Stevec4 - comment - 3 Aug 2021

Hi Richard
Thank you for the SQL fix I was just testing the install but applied it none the less.
Looks like extension id 496 is mod_latestactions, type is module, element is mod_latestactions, folder is blank and id is 496.

Let me know if I can provide any other info.
Steve

avatar richard67
richard67 - comment - 3 Aug 2021

Let me know if I can provide any other info.

@Stevec4 No, that's sufficient. Thanks for reporting the issue and answering my questions. Am working on a fix for the next 3.10 RC 2.

avatar richard67
richard67 - comment - 3 Aug 2021

@Stevec4 Do you have any idea how it comes that the extension id 496 is mod_latestactions? In the update SQL script 3.9.0-2018-05-20.sql we inserted it with id 319 when updating an older version to 3.9.0, and I can't see that this has ever changed.

Could you check if you have an extension with extension id 319 and if yes, what kind of module it is?

avatar richard67
richard67 - comment - 3 Aug 2021

Pull request for the fix is #35034 . It has still draft status because I have to write testing instructions, but the code changes are already finished.

avatar richard67 richard67 - close - 4 Aug 2021
avatar richard67
richard67 - comment - 4 Aug 2021

Closing as having a pull request. Please test #35034 . Thanks in advance.

avatar richard67 richard67 - change - 4 Aug 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-08-04 09:47:07
Closed_By richard67
Labels Added: ?
Removed: ?

Add a Comment

Login with GitHub to post a comment