All of my data in nodes that had custom field permissions disappeared. I don't know what combination of factors caused this, but I've tried it multiple times with old backup data. Every single field except for title is empty (I assume because the new field permissions changes it how it writes to tables and the old tables got erased). If someone can help me quickly to get back in working shape, I'd appreciate it. But I'm posting to warn everyone to test this carefully before deployment.


RobLoach’s picture

Try going back to alpha1, uninstalling, and then re-installing beta1. There is an upgrade path, but the upgrade path is handled by upgrade.php....

RobLoach’s picture

..... or uninstalling from beta1. hmmm.

robby.griffin’s picture

Would uninstalling remove all my old field permissions though? I'm trying things out in a test server, but I don't know this module well enough to predict how uninstalling affects things.

robby.griffin’s picture

Status:Active» Fixed

Uninstall, update module, then enable does the trick. However, it wipes all previously created field permissions, so takes snapshots and remake them after updating. Would love to see the upgrade path work, but at least I can use it again.

ZeiP’s picture

Status:Fixed» Active

As far as I could tell, it removed the data altogether when doing the update – am I correct? If so, it would be crucial to add a note about this on the release notes.

robby.griffin’s picture

That is correct. All the data in any node that had field permissions (including fields that weren't protected) was completely wiped. I had to restore from a backup and recreate any parts that weren't on the backup. Adding this issue to the release notes would be very helpful I imagine.

Taxoman’s picture

Title:Beta1 breaks site» Field_permissions upgrade breaks site, uninstall+reinstall causes loss of settings
David_Rothstein’s picture

Title:Field_permissions upgrade breaks site, uninstall+reinstall causes loss of settings» Field_permissions upgrade to beta 1 breaks site
Status:Active» Postponed (maintainer needs more info)

Uninstalling a module always removes its settings. That's how Drupal works :)

In terms of the original bug report, I think this needs exact steps to reproduce. (I.e., something like this: "Install Drupal 7 with Field Permissions version X, configure your site by doing X, Y and Z, then update to 7.x-1.0-beta1, and your site will break.") I've tested this module's upgrade path a number of times and never saw any problem at all, so if there is a problem it must be only under certain specific conditions.

It's also really hard to believe that there is any actual data loss caused by the Field Permissions module, since the Field Permissions update does not touch any of the site's data at all.

ZeiP’s picture

I can't currently tell the exact steps to reproduce this on a fresh install. However, I reproduced this again when doing updates on a site – On the production site table field_data_[fieldname] has five rows, on the test install after upgrading field_permissions from 1.0-alpha1 to beta1 the table is empty. I'd really hope you'd put up a warning about this on the release notes, it's a very nasty bug to come by!

I can try to get some more info after I've done the updates.

goldlilys’s picture

My problem is not that it's breaking the site, but when using the custom permissions, I don't see the different types of options per field. It seems to just refresh the page and nothing happens.

ZeiP’s picture

I traced this bug to some point. It's not about Field permissions, as David suspected. The bug occurs when using the function field_update_field(), which uses field_has_data() to determine if the field has data, but incorrectly sees many of my site's fields as empty. Because of this, field_update_field() removes all the data and completely regenerates the field when a parameter is changed at field_permissions.install.

ZeiP’s picture