blog
blog copied to clipboard
Plugin functions affecting page properties
https://github.com/TYPO3GmbH/blog/blob/cd8a00a3925b97fd93cc128478000a168d65654c/Classes/Controller/PostController.php#L238
The marked point is a good feature to help out automatic setup of the blog but causes also a problem. At this point the plugin which is a content element, directly affects the page properties, which should not be mixed IMHO. We stumbled upon this behavior as the customer was reporting that his meta description of the page has been missing even though it definitely got saved etc. (also yoast_seo breaks, which is just a side affect)
My recommendation would be to check for the existence/value of the category and leave the tag addition out if the value is empty
I provided a patch for this specific "empty metatags" case. What i don' t like in general is the mixing of pages and content - the plugin directly affects the properties of the pages. Those plugins are used on specific pages so you could argue it's not that breaking, but for people adding proper titles etc. the meta-tag handling directly affects their settings by overriding them. I would recommend a setting to disabel/enable this feature - it is nice for standalone usage and helps the editor but its affecting the advanced users
The fact, that og_title from the table "pages" is overwritten, seems like a bug to me. However, even if pages.og_title were empty, a content element should not have any effect on the meta tags. The preview on Facebook or Twitter merely shows the title of the selected category, when using "List by Category". The page title is in most cases more meaningful and inviting (even when pages.og_title is empty).
In one installation, we placed the "List by Category" element on many pages. It took me quite a while to find the reason for those weird meta tag values. I didn't even consider a content element as the origin of the problem, because this behaviour is so unusual.
As @helsner said, this "feature" should be optional (and disabled by default).
once again i stumbled upon this issue. Our customer has the category plugin on the home page which causes the first category title to be set as title tag. This is totally not working out and wanted. I will try to change this on my initial PR
We have the same case - customer have post list by category on home page. Title and description is empty on that page because is overridded by plugin. We XClass listPostsByCategoryAction but this solution is far from ideal. Can we use some kind of flag in TS to turn off meta tags for lists?
PS. can someone explain why plugin creating post list overrides meta of page when editor can manage metatags from page TCA form?