I have been running Fivestar 7.x dev for about a month. I have been having trouble with it and would like to uninstall it and try reinstalling since there is now an alpha release, however, whenever I try to uninstall Fivestar, the module says it is required by Drupal (fields pending deletion). The only info I can find on this problem is to try and run cron, which I have done about 20 times in a row and the module is still stuck in this state. I have looked in the db and the fields do not appear to be in there.

Does anyone have any experience with this particular error, or any advice? Thanks.

Comments

ericduran’s picture

Status: Active » Closed (works as designed)

This is not a bug.

If you want to uninstall, you will see there's a a link called Field list. If you click on that link you will see the entity types that have a fivestar field in it. You must remove the fields before uninstalling.

I'm honestly not sure when the feature when in. But this seems to be a requirement not before removing uninstalling field modules.

kalilo’s picture

I just want to disable the module, not remove it, So what should I do? I cant see any option to do this.
Thanks

Ross-Hunter’s picture

Status: Closed (works as designed) » Active

I should have been more clear, I have deleted all the fields that are in the Field List for five star. Before I delete them, it gives a link to the list, after I have deleted them is when I get stuck in the Fields Pending Deletion state.

renat’s picture

Faced the same problem with another module (Organic Groups). Probably this issue belongs to D7 core?

awolfey’s picture

Run cron. That will complete the deletion.

renat’s picture

Run cron MULTIPLE times, I should add. In my case, 5 times wasn't enough, so I thought something is broken.

dddbbb’s picture

So how do you only disable a module that is linked to the field list in this way?

renat’s picture

dixhuit, you have to delete all this module-provided fields (and all data in it, obviously), and then run cron multiple times. After that you'll be able to disable this module (though, de-facto, it is nearer to uninstallation, as you have to delete all data). Now you can't disable field-providing module, but to store the data in it's fields. This controversial behaviour was introduced in core after heated debates.

dddbbb’s picture

Blimey. Well that makes troubleshooting a little tougher these days then.

dddbbb’s picture

So to upgrade such a module you no longer have to disable it? Just overwrite the previous module directory and run update.php?

renat’s picture

Well, I have never disabled modules before the upgrade. Usual I do use Drush, though, it makes all routine tasks for me.

And yes, there are one method to disable field-providing module for testing purposes without deletion of it's fields - you should delete module's folder. But it is suitable not for all modules. Most complex and deep-integrated with your site will kill it after such "shutdown".

ericduran’s picture

Status: Active » Closed (works as designed)

This really isn't a fiveatar issue. So I'm closing this.

timofey’s picture

#6 - Running cron multiple times did the trick!

tomogden’s picture

No amount of cron runs (100's) worked for me.

So I removed the module from my modules directory, ran cron, then put it back, and it let me disable it. I then ran the Uninstall.

himem’s picture

#5 Thanks for the Cron hint. Worked for me.

milesw’s picture

So I removed the module from my modules directory, ran cron, then put it back, and it let me disable it. I then ran the Uninstall.

Good tip. This has worked for a couple modules now where "Fields pending deletion" seems to be stuck.

kalilo’s picture

So, How can I upgrade this module if I can not uninstall it first, really confused...

dropbydrop’s picture

I have the same problem with latest fivestar-dev version.
I deleted the fields, I run cron, I cannot disable it

wooody’s picture

Thank u, This fixed my problem.

jienckebd’s picture

Running cron did the trick -- thanks!

meSte’s picture

#14 worked for me. Thanks

Anonymous’s picture

#6 worked for me. Thanks

msedlacek’s picture

hi everyone. I am currently using 7.x-2.0-alpha2 in production and wanted to install to the latest dev to get some of the newer functionality that ties in with the micodata module. If I were to wait until this module goes from dev to a recommeded release then would I be able to run the update automatically without having to delete the fields, re-install the module, and then recreate the fields?

Also, it sounds like if I want to go from 7.x-2.0-alpha2 to the 7.x-2.x-dev version then I need to actually delete those fields from my custom content types that have data (as explained in previous posts), then update the module, and then somehow reimport all the lost fivestar data into the database that I have lost from deleting those fields? Can someone confirm that data has to be deleted and then manually reimported if we want to keep this in the database? That seems like a lot of work just to get the newest dev module. If the next recommended release upgrades without this drawback then I will wait for it, if not then I will just do it now.

thanks for your input.

cooldeeponline’s picture

thanks worked for me!

hmalaboosi’s picture

run sql query:

DELETE FROM `field_config` WHERE `field_config`.`deleted` = 1;

adelka’s picture

#26 worked for me, thank you!

jazzitup’s picture

#6 worked for me.. I had a similar issue with Vote Up/Down module for D7.

nandwabee’s picture

#26 works.Had the same error from a different module. I am using Postgresql and the same query would read;

DELETE FROM field_config WHERE field_config.deleted = 1;

plato1123’s picture

>you have to delete all this module-provided fields (and all data in it, obviously), and then run cron multiple times. After that you'll be able to disable this module (though, de-facto, it is nearer to uninstallation, as you have to delete all data). Now you can't disable field-providing module, but to store the data in it's fields. This controversial behaviour was introduced in core after heated debates

*facepalm* Did whoever won this debate do so by pulling out a loaded firearm?

jakecraige’s picture

#26 thanks!

MrSasquatch’s picture

#26 worked for me, but I added an additional clause to make sure that only the rows I was concerned with would be deleted. And before I ran that, I first ran a SELECT version of the query, replacing DELETE with SELECT *. That way I was able to eyeball the affected rows before doing the irreversible delete.

SELECT * FROM field_config WHERE (field_config.deleted = 1) AND (field_config.type = "video_filter");

When I was comfortable with the affected rows, I ran this...

DELETE FROM field_config WHERE (field_config.deleted = 1) AND (field_config.type = "video_filter");

rameshbabu.g’s picture

#5: Worked for me.Thank You

victoriachan’s picture

Worked for me when I ran this several time:

drush php-eval 'field_purge_batch(100);'

See https://api.drupal.org/api/drupal/modules%21field%21field.crud.inc/funct...

maxplus’s picture

Thanks, #26 worked for me!

petergus’s picture

#14 worked (for some other random module), nice trick, thanks!

sobi3ch’s picture

Issue summary: View changes

#26 worked for me, yes!

brianlp’s picture

Had to run cron 8 times (Radioactivity).

frob’s picture

Project: Fivestar »
Version: 7.x-2.0-alpha1 »
Category: Bug report » Support request

This has nothing to do with fivestar, it is not a bug, and it should remain closed.

jasom’s picture

#26 worked for me. This bug can be somehow connected with the situation when you have same field used in more content types.

teflo’s picture

Thanks! #34

Karim EL Shazly’s picture

many thanks #14

tomsaw’s picture

#34 worked! Thanks

avpaderno’s picture

Notice that this issue has been posted in issue queue for a sandbox project without code. It's not an issue queue to ask support for, or post bugs in, Drupal core or third-party modules.

Despite the project name, this sandbox project is not linked to Drupal core in any way, and it may be removed at any time.

kreatil’s picture

Project: » Fivestar
Version: » 8.x-1.0-alpha2

In my case, I first manually deleted the fields in the entity type. Then I manually emptied (not deleted!) the corresponding data tables in the database and subsequently ran the cron job for field purging ("Purges deleted Field API data"). I'm using ultimate_cron. It was enough to run the cron job once.

avpaderno’s picture

Version: 8.x-1.0-alpha2 » 7.x-2.x-dev