Closed (fixed)
Project:
Feeds
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
6 Nov 2019 at 19:00 UTC
Updated:
24 May 2022 at 12:19 UTC
Jump to comment: Most recent
upon uninstalling feeds tamper it gave an error message that it will delete a feed type that contains tampered items. That feeds type had tampered elements before but not when it was put for uninstalling.
The configuration export showed - feeds_tamper still as a dependency. While under the tamper settings of that feed type nothing showed up.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
megachrizThanks for filing a bug report. It’s annoying Feeds Tamper cannot be safely uninstalled. I would need to take a deep dive in how configurations can get properly updated when wanting to uninstall a module that adds third party configuration (because that’s what Feeds Tamper does: it adds extra configuration on the feed type).
Comment #3
megachrizComment #4
jesss commentedI just ran into a similar issue when attempting to uninstall Feeds Tamper. NOTE: I had already deleted the Feed Type that had used Feeds Tamper prior to uninstalling the module, so it isn't exactly the same situation, but I hope this report helps you figure out the larger issues around uninstalling safely.
I ran
drush pm-uninstalland that worked as expected. I then rancomposer removeand that also completed without error. But when I then attempted to rundrush cr, I got the following errors:Putting the module code back via
composer requiretemporarily solved the problem, allowing me to determine that the issue was thatcore.extensionwithin the config settings still includedtamper: 0, suggesting it still expected the module to be there, even though it had been uninstalled (multiple times, by that point).Deleting that line via
drush config:editallowed me to remove the module files without crashing my site.Comment #5
jesss commentedI think I figured out what was going on with my uninstall. I had uninstalled
feeds_tamper. I had not uninstalledtamper. A note to the user reminding them that they need to uninstall both modules before removing any code would probably avoid a lot of frustration.Comment #6
sadman commented+1 on original issue.
Comment #7
megachrizI experienced the same issue while working on #2907721: Log items that failed to import and I found out that it is actually a Feeds issue.
The cause of the issue is that
FeedType::onDependencyRemoval()does not call its parent.ConfigEntityBase::onDependencyRemoval()cleans up third party settings from modules that are getting uninstalled.A fix will follow.
Comment #9
megachrizComment #11
megachrizIt took me a long time to figure out why the test did not fail on the testbot, but not locally. I setup DrupalCI locally (see https://www.drupal.org/drupalorg/docs/drupal-ci/running-drupalci-locally) and after a long debug round I finally found a difference between my local setup and the testbot. The cache backend is different. The testbot apparently uses ChainedFastBackend which wraps around ApcuBackend while my local setup uses DatabaseBackend. At first, in the test only branch the feed type remained in the APCu cache after deleting it programmatically. Clearing the APCu cache using
apcu_clear_cache()fixed that issue and made the test only branch finally fail on the testbot. Now I can ensure that the bug won't come back in the future.Merged the code.