Recently a change was committed to core that adds a new permission "administer fields". This breaks the admin tests for Entity Reference. I'll attach a patch shortly. As this is causing all tests to fail for new patches, I'll mark this Critical.

Comments

eelkeblok created an issue. See original summary.

eelkeblok’s picture

eelkeblok’s picture

Assigned: eelkeblok » Unassigned
Status: Active » Needs review
indigoxela’s picture

Thanks for creating issue and patch.

This patch works fine on Drupal 7.x-dev but not on stable (7.43) or below.

Invalid permission administer fields.

We need a check if permission 'administer fields' exists.
There seems to be no drupal function for "permission exists", at least I didn't find one.
But we could get the info from db table role_permission.

eelkeblok’s picture

Ah, OK. I wasn't really sure whether we needed to cater for older versions, but we probably should. How's this? This checks for the existence of field_permission() (field module's implementation of hook_permission()) and if it exists, invokes it and checks for the existence of the permission (the hook implementation being present currently should be indication enough that the permission itself is present too, since it is the only permission defined in it, but it's probably better to make sure).

indigoxela’s picture

Status: Needs review » Reviewed & tested by the community

Clever idea!

Now tests run smoothly on both - Drupal dev and stable.

Stevel’s picture

Status: Reviewed & tested by the community » Needs work

The same change should be made to the FeedsMapperFieldTestCase.

Also, since Drupal 7.50 is now out as the latest version, do we still want/need to support the older versions?

eelkeblok’s picture

Status: Needs work » Closed (outdated)

I don't think that makes much sense, no.

However, it seems that the change currently in the patch already made it into the module and otherwise the tests are fine (so the FeedsMapperFieldTestCase doesn't need the permisison after all?). I propose to close this issue.