2

I have been working on a component but noticed when I update it I get an error (something like "Component Update: DB error file function returned no error", not exact but close).

I notice this is due to the rows in the extension table (only the extension table). Deleting them fixes it. But that is basically "uninstalling" the component without removing its files/data (other then config), so its really not an option to do a preflight script and do that on update.

Due to the nature of the component I have a library that installs beside it, so I used F0F's installerscript tool (and extended it since it has no option to install libraries). F0F has a function called bugfixDBFunctionReturnedNoError() Which fixes the error using the technique described above. However its made to do it in install in case it was uninstalled and left anything remaining. But i need it done on update.

I did some changes to the installer script to make it run on update as well and it is working with that. However it is not the way around this problem, any thoughts on this?

2

Figured out the issue, when making a component you need to have at least 1 blank update sql file or it will fail. Not just the typical index.html file to make sure then installer does not skip the folder.

Typically the file would be something like sql/updates/mysql/VERSION.sql Replacing version with the actual needed version. I am confident this is a bug, it should not require an sql file on update but it is not urgent if it is, either that or there is something else I am missing.

1

I am getting this error quite often on a test system when trying to install a component which uses SQL updates and causes first time when installing an error (even not SQL related, such a missing file from the manifest file).

Here are some steps on how to fix this, by manually uninstalling the component, as from the Extension manager the installation may / will fail.

Find the id of your extension (you may also find multiple entries)

SELECT * 
FROM  `#__extensions` 
WHERE  `name` LIKE  '%myextensionname%'
LIMIT 0 , 30

Remove from #__schemas the entries for extension, where extension_id is the previous found id. Remove also any entries for non existing extensions:

Remove any assets for your extension:

SELECT * 
FROM  `#__assets` 
WHERE  `name` LIKE  '%myextensionname%'
LIMIT 0 , 30

Remove any menu entries:

SELECT * 
FROM  `#__menu` 
WHERE  `link` LIKE  '%myextensionname%'
LIMIT 0 , 30

Reinstall.

Note: originally posted on SO.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.