Skip to content

[PostgreSQL] Extension reinstall/update duplicate issue in database with PostgreSQL#19402

Closed
ghost wants to merge 1 commit intostagingfrom
unknown repository
Closed

[PostgreSQL] Extension reinstall/update duplicate issue in database with PostgreSQL#19402
ghost wants to merge 1 commit intostagingfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jan 19, 2018

Issue

If I install a module and again I update this module with Extensions: Install, It's making a duplicate entry every time in #__extensions and #__modules table.

Where is the issue?

The issue is in the database query. Currently, the query is something like that, which one will fail to get current extension_id.

SELECT "extension_id" FROM "#__extensions" WHERE element = 'mod_sample' AND type = 'Module'

But it should be

SELECT "extension_id" FROM "#__extensions" WHERE element = 'mod_sample' AND type = 'module'

Summary of Changes

I have changed $this->extension->type to strtolower($this->extension->type) and $this->type to strtolower($this->type) in all installer adapters.

Testing Instructions

Create a sample module and install it 2 or 3 times with Extensions: Install in Joomla! 3.8.3 and PostgreSQL v10.1. Now see the database #__extensions and #__modules table, you will find the duplicate entry of your sample module.

@ghost ghost changed the title Extension reinstall/update duplicate issue in database with PostgreSQL [PostgreSQL] Extension reinstall/update duplicate issue in database with PostgreSQL Jan 19, 2018
@alikon
Copy link
Copy Markdown
Contributor

alikon commented Jan 19, 2018

see #18416

@zero-24
Copy link
Copy Markdown
Contributor

zero-24 commented Jan 19, 2018

I'm closing here as we have a PR by @alikon thanks! @rajuahmmedbd please test #18416 and post your result there. Thanks!

@ghost
Copy link
Copy Markdown
Author

ghost commented Jan 24, 2018

@zero-24 can you please reopen this pull request? or I need to create a new pull request. This #18416 patch is not solving fully. This is a really serious issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants