Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Comment | File | Size | Author |
---|---|---|---|
#13 | taxonomy_access-undefined_constants-2719349-13.patch | 2.63 KB | KimNyholm |
| |||
#8 | taxonomy_access-2719349-8.patch | 4.38 KB | pifagor |
| |||
#5 | taxonomy_access-2719349-5.patch | 1.83 KB | pifagor |
1859x611_05_05_2016_img-01.png | 163 KB | pifagor |
Comments
Comment #2
pifagorPatch https://www.drupal.org/files/issues/taxonomy_access-2432997-4.patch
Comment #3
xjmHi @pifagor, thanks for reporting this!
Instead of adding the
require
, can you move the constants into the.install
file? They should be there instead of in the.module
file.Also, it's very surprising that this error has been around so long! Is the taxonomy access schema even being created correctly? We should add automated test coverage to ensure the database schema is created correctly on installation, with the correct values.
Comment #4
xjmComment #5
pifagorDo you mean it https://www.drupal.org/files/issues/taxonomy_access-2719349-5.patch?
Comment #6
pifagorComment #8
pifagorCall Work patch
Comment #11
pifagorComment #12
KimNyholm CreditAttribution: KimNyholm as a volunteer commentedWhen constants from .module are needed, the proper way seems to be using drupal_load() at uninstall. From documentation of hook_schema()
Comment #13
KimNyholm CreditAttribution: KimNyholm as a volunteer commentedAttached a patch with drupal_load() added in hook_schema() in taxonomy_access.install. It would be nicer to move the constants shared with taxonomy_access.module to a seperate file, but given the maturity of the module, this is a smaller change.
An additional test case has been added in taxonomy_access.test checking for correct creation of global defaults.
The patch has been tested with Drupal 7.43.