Needs review
Project:
Taxonomy Access Control
Version:
7.x-1.x-dev
Component:
Integration with other modules
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 May 2011 at 19:12 UTC
Updated:
14 Jan 2019 at 21:16 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
xjmThis is on the road map for 7.x-2.x (some day...); however, a patch for 6.x is welcome.
Comment #2
KimNyholm commentedComment #3
KimNyholm commentedPlease find attached a patch with features integration.
Comment #4
AliMartin commentedHi!
Silly question, but I'm having problems applying this patch. I'm developing locally on OSX / MAMP Pro 4 and ordinarily drop the patch file into the relevant module folder and run "patch < filename.patch" at the command line.
I've tried running this patch within the 7.x-1.x-dev version of the Taxonomy Access Control module folder (plus the Features and Features/Includes folders out of desperation, and the release version of TAC) but nothing appears to be happening to my Features control panel - I can't see any options to package up TAC settings into Features.
When I run "patch < features_module-1154392-3.patch" and press return I don't get any error messages, just the next line in the command prompt.
Drupal: 7.51
Features: 7.x-2.10
Features Extras: 7.x-1.0
Any pointers?
Comment #5
KimNyholm commentedIt should work for 7.x-1.x, see below.
Regards
Kim
After installing and clearing caches you should see Taxonomy Access Control in the features recreate panel, see attached.
.
Comment #6
AliMartin commentedHi Kim
Many thanks for your detailed reply. I was able to recreate those steps to a successful conclusion :) Must be a "feature" of the OSX patching method...!
Ali
Comment #7
alisonHi all! Love this, and thank you! Any guess wrt when it might be rolled-in? Thanks again!
Comment #8
joseph.olstadComment #9
alisonI guess we've been getting errors from this file (taxonomy_access.features.inc) -- on Drupal 7.60/7.61, with PHP versions 5.6 and 7.1. (Possibly before 7.60, too, I'm not sure exactly when it started!)
We're getting a slew of log entries, each containing this message:
Notice: Trying to get property of non-object in _tac_features_getTerms() (line 88 of /path/to/sites/all/modules/contrib/taxonomy_access/taxonomy_access.features.inc).I'm not 100% sure, but I think it happens when cron runs. I don't *think* it happens any other time.
Comment #10
alisonHi y'all! Anything I or anyone else can do to help getting this rolled into the module? Thank you!
Comment #11
alisonI added an
is_object()check, it seems to have stopped the errors I get on cron run -- I'm not positive but my guess is that the error happens when there are entities without the vocab or a term in the vocab.....?? So it's like, there's no term so it isn't an object? Anyway, I'm not sure if that's the cause, and also, if it were, I'm not sure why the error would happen on cron run. ANYWAY, regardless, idk if this patch is a good idea, y'all can let me know :)Comment #12
KimNyholm commentedThe is_object() test is ok to add to handle the situation where the term has been deleted from the database.
However I would suggest to skip only the missing terms using the following logic and always return an array:
Comment #13
alisonGotcha, I think that sounds sensible? Updated patch attached.
Silly question: It's ok to return the $terms array empty like that?