Closed (outdated)
Project:
Entity reference
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jun 2016 at 08:20 UTC
Updated:
5 Jan 2017 at 14:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
eelkeblokComment #3
eelkeblokComment #4
indigoxela commentedThanks 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.
Comment #5
eelkeblokAh, 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).
Comment #6
indigoxela commentedClever idea!
Now tests run smoothly on both - Drupal dev and stable.
Comment #7
Stevel commentedThe 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?
Comment #8
eelkeblokI 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.