Hi,
I hope to help.
A variable by the name " composer_autoload_path " is created when we submit the config form ("admin/config/development/composer_autoload"). The " composer_autoload_path " variable is not deleted on uninstalling the module.

Proposed Solution:-
1. Add a file named " composer_autoload.install "
2. Implement hook_uninstall() {} and delete the variable within it.

function composer_autoload_uninstall(){
  variable_del('composer_autoload_path');
}
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vishwac9 created an issue. See original summary.

vishwac9’s picture

Status: Active » Needs review
Issue tags: +Novice, +#novice
FileSize
428 bytes

Please find the patch

darrenwh’s picture

Status: Needs review » Needs work
Issue tags: +mssprintjan17
+++ b/composer_autoload.install
@@ -0,0 +1,13 @@
\ No newline at end of file

File missing new line at end of file

+++ b/composer_autoload.install
@@ -0,0 +1,13 @@
+	variable_del('composer_autoload_path');

Indentation needs to be 2 spaces

vishwac9’s picture

Status: Needs work » Needs review
FileSize
401 bytes

Thanks @darrenwh for pointing out the mistake, please find the updated patch

priyanka.attarde’s picture

Status: Needs review » Reviewed & tested by the community

Patch works well.

SwapS’s picture

Status: Reviewed & tested by the community » Needs work

@vishwac9

Variable will get created in DB only when user saves configuration form for the module is submitted.
Just simple install & uninstall will result sql failure as Variable doesn't exist in DB.

Suggestion : Add install hook with default value

Cheers
SwapS

vishwac9’s picture

@Swaps,

Thanks for the input, but i do not think so that would be a case. You can check for the variable_del document . It runs a db_delete query which checks for a condition by variable name, nor even the result of db_delete is checked. Even tried to install and quickly uninstall the module, havent seen any sql errors. If you do not have any other input please update the issue to RTBC, updated patches are surely welcomed :) .

vishwac9’s picture

Status: Needs work » Needs review
SwapS’s picture

Status: Needs review » Reviewed & tested by the community

@vishwac you are right there. Patch @ #4 worked well.

Cheers,
SwapS

apaderno’s picture

Issue tags: -#novice