On the page to edit taxonomy terms, the "Edit Meta Tags" tab is present, because its path doesn't start with 'admin'. metatags_quick_menu_local_tasks_alter() looks for 'admin' to prevent the tab on admin pages. Suggest altering that function or _metatags_quick_path_based_page() to also exclude the taxonomy term edit page to prevent confusion from users thinking that tab is used to edit the taxonomy SEO terms rather than the terms for the taxonomy edit page.

Comments

valthebald’s picture

Is there a good way to determine either we are in an admin page?

cwithout’s picture

I was hoping you'd know. :) After a little searching, I think I found what you need. Did a quick test, and it returned true for admin paths I tested (admin/config, admin/structure/views), taxonomy term edit, and node edit.

path_is_admin()

or

path_get_admin_paths()

I believe path_is_admin() will do the job. That should take care of any paths defined as admin paths by their modules using hook_admin_paths(). That hands it off to the other modules to make sure their admin paths are defined without having to make exceptions for them all within this one.

valthebald’s picture

Version: 7.x-2.0-alpha4 » 7.x-2.x-dev
Assigned: Unassigned » valthebald

Yes, this looks fine. Thanks for pointing!

valthebald’s picture

Version: 7.x-2.x-dev » 7.x-2.0-beta1
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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