?
avatar krogias
krogias
24 Mar 2016

Steps to reproduce the issue

Install the update 3.5

Expected result

Message of successful update

Actual result

An error has occurred.
1062 Duplicate entry '452' for key 'PRIMARY' SQL=INSERT INTO #__extensions (extension_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 (452, 'plg_system_updatenotification', 'plugin', 'updatenotification', 'system', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);

Ι pressed the "Return to control panel" button and it asked me to update the "Installer - Install from Web 1.1.0" from 1.0.5

System information (as much as possible)

Database Version: 5.6.21
Database Collation: utf8_general_ci
Database Connection Collation: utf8mb4_general_ci
PHP Version 5.6.3
Web Server Apache/2.4.10 (Win32) PHP/5.6.3

Additional comments

Everything looked fine. Website works fine with no problems so far.

error1062

avatar krogias krogias - open - 24 Mar 2016
avatar brianteeman brianteeman - change - 24 Mar 2016
Labels Added: ?
avatar ggppdk
ggppdk - comment - 26 Mar 2016

This does not sound like a Joomla bug, first try to repair table if it is MyIsam

  • for storing extension data the installer will create an instance of JExtension which inherits store from JTable (right?)
JTable->store()   

which will do an INSERT if the COUNT of found rows for the given primary keys is not 1
... maybe it was done on purpose so as to find corrupt tables ?

In phpmyadmin or other mysql tool execute this query (replace PPP with your DB prefix):

 SELECT COUNT(*) from  PPP_extensions WHERE id = 452

[EDIT: correction] column name is: extension_id and not: id
If it returns 2 or more the DB table is invalid state
(don't just try to list records in phpmyadmin, because it will list just one)

Also it maybe relevant:
In phpmyadmin or other mysql tool, check that a record with extension_id: 452, exists in all of them
__extensions
__schemas
__updates
__update_sites_extensions

avatar krogias
krogias - comment - 28 Mar 2016

@ggppdk Γιώργο,
I 've executed the query and I got:

SELECT COUNT() from **_extensions WHERE id = 452 LIMIT 0, 25
Η MySQL επέστρεψε το μήνυμα: Τεκμηρίωση
#1054 - Unknown column 'id' in 'where clause'

?!
Also, I 've searched for the record id 452 and it only exists in plg_system_cp extension

And finally, I 've noticed that, whenever I am updating an extension via Update Sites extension (and not by uploading the file):
a) With PHP5 (my live website), I get a blank page, I refresh the page and the extension is updated with no other problems.
b) With PHP7 (my localhost test site), I get the "An error has occurred. Return to control panel" with no more info, I return to cpanel and everything looks fine again.
I had that issue today with ALF Contact update, again.

I am confused.

avatar ggppdk
ggppdk - comment - 28 Mar 2016
SELECT COUNT(*) from  PPP_extensions WHERE extension_id = 452

my mistake, I meant to write "extension_id" that is the name of the column, and not "id"
also replace "PPP" with your DB prefix

avatar krogias
krogias - comment - 28 Mar 2016

1 count. As expected. In plg_system_cp . Nothing else.

avatar ggppdk
ggppdk - comment - 28 Mar 2016

Also it maybe relevant:
In phpmyadmin or other mysql tool, check that a record with extension_id: 452, exists in all of them
__extensions
__schemas
__updates
__update_sites_extensions

Also check that the record 452 exists in all the above tables

avatar krogias
krogias - comment - 28 Mar 2016

Yeap. Did that also:
"Also, I 've searched for the record id 452 and it only exists in plg_system_cp extension"

avatar brianteeman
brianteeman - comment - 28 Mar 2016

What is plg_system_cp ?

avatar krogias
krogias - comment - 28 Mar 2016

Sorry, I meant 452 exists only in _extensions and it's the id of plg_system_cp.
sql

avatar brianteeman
brianteeman - comment - 28 Mar 2016

Sounds to me that whatever plg_system_cp is it has been installed in a non
standard way which is why it is causing issues. No third party extension
should have an id below 10000 if it has been installed by the joomla
installer.

On 28 March 2016 at 09:12, krogias notifications@github.com wrote:

Sorry, I meant 452 exists only in _extensions and it's the id of
plg_system_cp.
[image: sql]
https://cloud.githubusercontent.com/assets/8203277/14073959/f14b1a4c-f4d5-11e5-9aba-87d097fb4339.jpg


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#9578 (comment)

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar krogias
krogias - comment - 28 Mar 2016

"This plugin provides a variety of system information and assistance for the creation of translation files."
It seems to be a system extension. Isn't' it?

plg

plg2

avatar brianteeman
brianteeman - comment - 28 Mar 2016

It is not a core extension - if you go to extensions - manage and find it
there then you should see who the author is (assuming they didnt just copy
paste an existing manifest)

avatar krogias
krogias - comment - 28 Mar 2016

plg3

It says "Joomla! project"..
I will disable it to see what happens.

avatar infograf768
infograf768 - comment - 28 Mar 2016

It may mean that the site has been compromised

avatar krogias
krogias - comment - 28 Mar 2016

I don't know German. Does this mean that the gmapfp causes the problem? Din't have any issues before 3.5.

avatar ggppdk
ggppdk - comment - 28 Mar 2016

It means your site has been hacked ?

  • one of the installed hacks is "plg_system_cp" ?
avatar krogias
krogias - comment - 28 Mar 2016

Nice.. Perfect! :(

avatar zero-24
zero-24 - comment - 28 Mar 2016

@krogias so can we close this issue than? If you need help with you hacked site the http://forum.joomla.org can help you :)

avatar krogias krogias - close - 28 Mar 2016
avatar krogias
krogias - comment - 28 Mar 2016

Yeap. Closed. I 've cleaned it already. Thanks for the help!

avatar krogias krogias - change - 28 Mar 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-03-28 08:57:20
Closed_By krogias
avatar krogias krogias - close - 28 Mar 2016
avatar dfrassi
dfrassi - comment - 1 Apr 2016

The malicious script is installed with the Gmapfp extension J3.38F, now present in VEL https://vel.joomla.org/live-vel

avatar krogias
krogias - comment - 1 Apr 2016

Thank you @dfrassi ,
I will contact the developer because gmapfp is one of the most important
components in my site.
What does this script do?

avatar fabrice4821
fabrice4821 - comment - 2 Apr 2016

Hi,

It isn't a malicious script.
If you check the code you see that is just a plugin for protect the link for the copyright of GMapFP.

I have forget to rename it. I will rename it in the for the new vesrions.

Sorry for the disturbe.

avatar krogias
krogias - comment - 2 Apr 2016

No disturb for me. Just inform them. :)

2016-04-02 13:39 GMT+03:00 fabrice4821 notifications@github.com:

Hi,

It isn't a malicious script.
If you check the code you see that is just a plugin for protect the link
for the copyright of GMapFP.

I have forget to rename it. I will rename it in the for the new vesrions.

Sorry for the disturbe.


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#9578 (comment)

avatar dfrassi
dfrassi - comment - 2 Apr 2016

if a plugin is installed as a system plugin, for me is malicious because
the joomla 3.5 update fails.

2016-04-02 12:39 GMT+02:00 fabrice4821 notifications@github.com:

Hi,

It isn't a malicious script.
If you check the code you see that is just a plugin for protect the link
for the copyright of GMapFP.

I have forget to rename it. I will rename it in the for the new vesrions.

Sorry for the disturbe.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#9578 (comment)

avatar brianteeman
brianteeman - comment - 2 Apr 2016

The problem was NOT that it was a system plugin - that is perfectly
acceptable

The problem was that it was installed with the wrong ID and had the wrong
creation date and author

On 2 April 2016 at 13:14, David notifications@github.com wrote:

if a plugin is installed as a system plugin, for me is malicious because
the joomla 3.5 update fails.

2016-04-02 12:39 GMT+02:00 fabrice4821 notifications@github.com:

Hi,

It isn't a malicious script.
If you check the code you see that is just a plugin for protect the link
for the copyright of GMapFP.

I have forget to rename it. I will rename it in the for the new vesrions.

Sorry for the disturbe.


You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub
<#9578 (comment)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#9578 (comment)

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar dfrassi
dfrassi - comment - 2 Apr 2016

Sorry, not a simple system plugin but a protected system plugin. Not
removable. We can remove it only if we update the #_extensions table.
Il 02/Apr/2016 13:17, "Brian Teeman" notifications@github.com ha scritto:

The problem was NOT that it was a system plugin - that is perfectly
acceptable

The problem was that it was installed with the wrong ID and had the wrong
creation date and author

On 2 April 2016 at 13:14, David notifications@github.com wrote:

if a plugin is installed as a system plugin, for me is malicious because
the joomla 3.5 update fails.

2016-04-02 12:39 GMT+02:00 fabrice4821 notifications@github.com:

Hi,

It isn't a malicious script.
If you check the code you see that is just a plugin for protect the
link
for the copyright of GMapFP.

I have forget to rename it. I will rename it in the for the new
vesrions.

Sorry for the disturbe.


You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub
<
#9578 (comment)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
<#9578 (comment)

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#9578 (comment)

avatar krogias
krogias - comment - 2 Apr 2016

@dfrassi When we found about it, I deleted it from #_extensions (id 452). Does this mean that this missing extension id number will cause problems with future joomla updates?!
I mean I have 451, gap, 453, 454 etc... Is that a problem for the joomla system?

avatar dfrassi
dfrassi - comment - 2 Apr 2016

I don't think so
Il 02/Apr/2016 14:23, "krogias" notifications@github.com ha scritto:

@dfrassi https://github.com/dfrassi When we found about it, I deleted
it from #_extensions (id 453). Does this mean that this missing extension
id number will cause problems with future joomla updates?!
I mean I have 452, gap, 454, 455 etc... Is that a problem for the joomla
system?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#9578 (comment)

avatar fabrice4821
fabrice4821 - comment - 2 Apr 2016

Hi,

In the 3.39F version I rename the plugin. I had built it from a system plugin and I had not renamed.

The code of this plugin is

    if (JFactory::getApplication()->isSite()) {
        $doc = JFactory::getDocument();
        $cacheBuf = $doc->getBuffer('component');

        $find_1 = strpos($cacheBuf, '<div\>');
        $find_2 = strpos($cacheBuf, '<form\>');
        if ($find_1 or $find_2){
            $html = '';
            $html .= '<div style="text-align:center;">';
            $html .= '<a href="http://gmapfp.org" target="_blank">GMapFP</a>';
            $html .= '</div>';
            if ($find_1) $cacheBuf = str_replace('<div\>', $html.'</div>', $cacheBuf);
            if ($find_2) $cacheBuf = str_replace('<form\>', $html.'</form>', $cacheBuf);
            $doc->setBuffer($cacheBuf ,'component');
        }
        return true;
    }

There are nothing malicious !

avatar fabrice4821
fabrice4821 - comment - 2 Apr 2016

You can delete this plugin by phpmyadmin and reinstall GMapFP

avatar fabrice4821
fabrice4821 - comment - 2 Apr 2016

This plugin is used only for the free version. If you used the Pro version, you can remove it.

avatar krogias
krogias - comment - 2 Apr 2016

@fabrice4821 reinstall FMapFP from the scratch!?

avatar krogias
krogias - comment - 2 Apr 2016

That's better :)
Στις 2 Απρ 2016 20:56, ο χρήστης "fabrice4821" notifications@github.com
έγραψε:

This plugin is used only for the free version. If you used the Pro
version, you can remove it.


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#9578 (comment)

Add a Comment

Login with GitHub to post a comment