Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
metatag_entity_info_path() crashes with entities built with ECK.
There's already code to handle something similar through the MetatagEntityMock class.
I extended this class for ECK not to crash.
Comment | File | Size | Author |
---|---|---|---|
#1 | 2514812-eck-crash.patch | 867 bytes | david_garcia |
Comments
Comment #1
david_garcia CreditAttribution: david_garcia commentedComment #2
david_garcia CreditAttribution: david_garcia commentedJust as a side comment, the approach used in metatag_views_post_render() is quite dangerous.
You could achieve something similar by exploiting the router item definition:
This is a custom override of menu_get_object that searches for the first ocurrence of an entity type in the current router, but could serve as a base idea for an alternative implementation.
Comment #3
DamienMcKennaOut of interest, does the change in #2514878: Ignore admin pages for Views, Panels custom hooks also fix it?
Comment #4
DamienMcKennaNote - #2514878 won't fix anything, but it'll stop the faulty logic from executing on admin pages, where meta tags aren't wanted.
Comment #5
DamienMcKennaI've committed this fix. Thanks, David.
Comment #6
DamienMcKenna