Add a way to provide meta tags specifically for 403 and 404 pages.

Comments

plopesc’s picture

Hello

To do this, we can use a workaround with context_error and metatag_context modules for this pages.
However, if you consider it necessary, I could help with this feature request.

plopesc’s picture

Status: Active » Needs review
StatusFileSize
new4.03 KB

Attaching patch that could address this.

By default, it does not cache the results, but we could add the variable you mentioned in #2090557: Don't load/cache data on 403 & 404 error pages to allow cached values.

Regards.

damienmckenna’s picture

Nice, I'll review it tomorrow.

plopesc’s picture

Could this feature be included in beta-8?

If you need any change, let me know.

Regards.

damienmckenna’s picture

I'll give it a test run tonight and will post a follow-up.

damienmckenna’s picture

StatusFileSize
new8.42 KB

I've changed it around a little bit. I realized that there's no point in not caching the 403/404 page output as the new structure results in only one cache object per 403 or 404 page, not an infinite number; I've also removed the now-unnecessary 'metatag_cache_error_pages' variable that only existed for a few weeks.

damienmckenna’s picture

Oh, also the patch in #6 adds several default values for the Open Graph, Dublin Core and Twitter Cards submodules; in each case the values are set to mimic what would be output on the homepage, i.e. if someone shared a 403 or 404 page on a social network they'll only get a link to the site's homepage, not the error page.

plopesc’s picture

Nice!
Thank you for your great work. If you need any help, just let me know ;)

hyperglide’s picture

@plopesc -- if wanna help -- then please test the patch ;-)

damienmckenna’s picture

Status: Needs review » Fixed

Committed! Thanks plopesc!

Status: Fixed » Closed (fixed)

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