Enabling/disabling metatags for custom entities and bundles no longer works since 7.x-1.0-alpha7 because now metatag_entity_has_metatags($entity_type, $entity) can return TRUE for an entity for which metatag_entity_supports_metatags($entity_type, $bundle) returns FALSE.

I'm attaching a patch that makes the module respect its own metatag_entity_supports_metatags() function again.

Comments

jax’s picture

Status: Needs review » Closed (duplicate)
JvE’s picture

Status: Closed (duplicate) » Needs review

Re-opening since this issue is about the bug that metatag_entity_has_metatags($entity_type, $entity) can return TRUE for an entity for which metatag_entity_supports_metatags($entity_type, $bundle) returns FALSE.
Not about controlling Meta tags per content type.

damienmckenna’s picture

Status: Needs review » Needs work

Needs to be rerolled, but I think this will be worthwhile.

damienmckenna’s picture

Tag.

JvE’s picture

Status: Needs work » Needs review
StatusFileSize
new3.17 KB
new2.44 KB

I updated the test and rerolled the patch.

Changes to the test:
- removed invalid cases that should (and will) throw exceptions in core entity handling.
- changed testing metatag_entity_supports_metatags to testing metatag_entity_has_metatags since the actual module functionally uses the latter.

Changes to the module:
- entities can no longer "have" metatags if their entity-type/bundle does not support them (or they have been disabled).

Status: Needs review » Needs work

The last submitted patch, metatags-disableable-combined-1718594-5.patch, failed testing.

JvE’s picture

Status: Needs work » Needs review
StatusFileSize
new2.91 KB
new2.31 KB

Sigh..

damienmckenna’s picture

Assigned: Unassigned » damienmckenna

Will be reviewed next.

damienmckenna’s picture

Status: Needs review » Fixed

Committed! Thanks JvE!

damienmckenna’s picture

Status: Fixed » Closed (fixed)

Last night saw the release of 7.x-1.0-beta1, so I'm closing all these "fixed" issues in the interest of tidying up the issue queue. Thank you all for your help getting us to this point!

damienmckenna’s picture

Issue summary: View changes

Updated issue summary to clarify the bug and avoid confusion.

damienmckenna’s picture

Assigned: damienmckenna » Unassigned
Issue summary: View changes