With the architecture change in 1.5 that made it easier to enable entities, it also caused more entities to become enabled than should have been. Update the install and update scripts to block out more unsuitable entities.

Comments

damienmckenna’s picture

neovictor’s picture

stupid update, you idiots?

damienmckenna’s picture

@neovictor: There's a code of conduct for working within the Drupal community, and having an account on drupal.org in the first place indicates you (should have) read it and indicated agreement to its standards. Your third comment for the 2 years and 4 months you've had an account, is clearly in violation of this. Please clean up your attitude.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new9.37 KB

This makes a few small changes:

  • Entities must be fieldable.
  • Entities will not be considered as having view modes if they only have ones from the iCal, Diff or Token modules.
  • Entities will be disabled by default, excluding the core Node, Taxonomy Term and User entities, to avoid them showing up in places they wouldn't be wanted.
  • A new hook was added which allows further control over whether entities are supported: hook_metatag_entity_type_is_supported_alter()

Status: Needs review » Needs work

The last submitted patch, 4: metatag-n2499865-4.patch, failed testing.

geerlingguy’s picture

Giving a general +1 here; there are a bunch of manual steps involved in upgrading to 1.5 while preserving former settings (e.g. individual content types need to be re-enabled in the /admin/config/search/metatags/settings page so they show properly on the Defaults page, etc. Hopefully the 1.6 release will help make the process a little more painless :)

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new12.39 KB

Lets see what the testbots think of this. I've resolved all of the test errors locally and added a new update script to manually enable the node, taxonomy term and user entity & bundles.

Status: Needs review » Needs work

The last submitted patch, 7: metatag-n2499865-7.patch, failed testing.

damienmckenna’s picture

AH! If I run the tests using PHP 5.3 the tests fail, but with PHP 5.6 (my local default) the pass. At least it's easy for me to change the local default :)

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new15.23 KB

Ah! I worked out a flaw in my logic for hook_install(). It was skipping all entities that didn't have any bundles. However, when a site is first installed and node.module is installed there aren't any content types, ditto for taxonomy. So, what I had to deal with the three bundled entity types (node, taxonomy_term, user) separately and specifically enable them. I've also added hook_node_type_insert(), hook_node_type_delete(), hook_taxonomy_vocabulary_insert() and hook_taxonomy_vocabulary_delete() to update the variables accordingly.

damienmckenna’s picture

Green! Woot!

The last submitted patch, 7: metatag-n2499865-7.patch, failed testing.

damienmckenna’s picture

Status: Needs review » Fixed

Committed.

  • DamienMcKenna committed aea9e10 on 7.x-1.x
    Issue #2499865 by DamienMcKenna: Improvements to entity selection, all...

Status: Fixed » Closed (fixed)

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