Hello ive searched everywhere for the answer to this and im suprised that i cannot find it. For some reason my 'flag term' is not showing on my taxonomy term view. I would like to add it manually. I think i actually done this a year ago but i just cant suss it out now after a few weeks of searching about.

Does anyone have any code to show a flag term that i can attached, maybe in a View header, for flaffing taxonomy terms?


#7 2047869.flag_.flag-pseudofields-on-flag-entity-class.patch392 bytesjoachim
PASSED: [[SimpleTest]]: [MySQL] 254 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


joachim’s picture

Status: Active » Fixed

It should show, but you need a recent version of Drupal core as there was a bug for taxonomy terms that was fixed at some point in the last 6 months.

fadgadget’s picture

Version: 7.x-3.x-dev » 7.x-3.0-rc1
Status: Fixed » Needs work

Thanks joachim. I do have drupal 7.22 on my site. Let me go change theme and see if it shows up then..... no still not showing. I have flag 7.3 and no other flag modules enabled. I dnt mind just adding it manually...actually no now i think of it id prefer to have it automatically added. It used to work for me as i used to get that taxonomy term token error that you mentioned

fadgadget’s picture

ill go try dev...

fadgadget’s picture

Version: 7.x-3.0-rc1 » 7.x-3.0

no doesnt seem to be appearing. tried it on Zen theme and updated to dev version. I havent overwritten the tax term tpl or anything. I have checked the box in my flag to show on taxonomy term page. I really cant think for why this could be.

Has anyone ever experienced this and worked out how to get it to appear? thanks

fadgadget’s picture

Ive created a new Taxonoy flag and the same thing is happening with that ie not showing on term page. Just reverted the taxonomy term view to default also but still no joy. would enabling the Flag Actions or Bookmark modules maybe help my case?

Im not using Panels although i am using Context

Colin @ PCMarket’s picture

Im using Drupal core 7.23 and the taxonomy flag is also not showing for me in the manage display for the taxonomy vocabulary

I have tried flushing the cache a couple of times, still no luck.

joachim’s picture

Title: Manually Add 'Flag Term' Link » Flag pseudofield doesn't show on flags that use flag_entity class
Status: Needs work » Needs review
392 bytes
PASSED: [[SimpleTest]]: [MySQL] 254 pass(es). View

The link appears on terms for me.

>not showing for me in the manage display for the taxonomy vocabulary

That's not 'showing on terms'. It's really important to be precise in bug reports!

The problem is this bit in hook_field_extra_fields():

    if (!is_subclass_of($flag, 'flag_entity')) {

Can you try this patch please? You'll need to do a cache clear for the effects to take if you're not on 3.1 yet.

Colin @ PCMarket’s picture

Sorry for not being precise on the previous bug report

Thank you so much for the quick patch.

I have implemented the patch now and it has fixed the issue. :)

The Flag pseudofield now works on the manage display page of the taxonomy term as well as the taxonomy term page itself.

Cheers and thanks again.


joachim’s picture

Category: support » bug
Status: Needs review » Fixed

Excellent! Thanks for testing the patch.

I've committed the fix, though with is_a() changed to instanceof, as otherwise everyone who is still running Drupal on PHP 5.2 will complain about the PHP warning.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.