Closed (fixed)
Project:
Metatag
Version:
8.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Mar 2016 at 09:25 UTC
Updated:
31 May 2019 at 21:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
damienmckennaWithout knowing more, it's hard to know what's going on.
The module itself doesn't do any caching, instead it relies upon Drupal's entity caching.
I'm going to mark this Postponed for now because we'll need to come back to it later.
Comment #3
damienmckennaComment #4
socialnicheguru commentedIt was the combination with schema_metatag module that slowed things down not the metatag module itself.
Comment #5
socialnicheguru commentedThis issue gives more context and the reason why: https://www.drupal.org/project/schema_metatag/issues/2958733#comment-125...
Comment #6
socialnicheguru commentedComment #7
muranod commented@SocialNicheGuru I just discovered this, though I had a "keywords" field based on the Metatag module in my content type for 7 or 8 months with no issues. Suddenly, the node edit for started hanging for 30 - 40 seconds each time I opened it, and each time I opened a paragraph within that form.
Keywords was my field name for the Metatag module's Advanced meta tags field in the node edit form. When I disabled display of that field, the node edit form loaded quickly. Strange that it only now started causing issues. I discovered this by creating a new content type and creating each field from the old type, and testing the form each step of the way.
Comment #8
karens commentedI created a patch that adds a settings form where you can identify the specific groups you want to display on each entity type / bundle combination, then adjusts the default form and the field form if specific groups are identified. With the patch, both the default forms and the node edit forms load much more quickly.
To use:
- Add the patch.
- Clear caches.
- Go to the new settings form /admin/config/search/metatag/settings
- Select the specific groups you want to see on each entity type/bundle
- Save the settings.
- Go to the default form (i.e. admin/config/search/metatag/node__article) and you should only see the groups you requested.
- If you use the metatag field, go to the node edit form and look for Metatags in the right column and you should only see the groups requested.
Comment #9
damienmckenna@karens: That's a good start, thank you.
I think it'd be better if the global settings didn't limit the form, but the field widget could be limiting via the widget settings.
Comment #10
karens commentedI have performance problems on the global settings form, too, which is part of the reason for doing this.
Comment #11
damienmckennaAh. Oh. Wouldn't it be easier to just disable the relevant submodule?
Comment #12
karens commentedNope if you have a site that requires a bunch of them but each on different content types, which is a common use-case for schema metatag. You can't disable anything so everything comes along for the ride in every single place. I'd be happy to screenshare and show you what a horrible UX it is. The default form is practically unusable, the node form is even worse of course. Plus you can't tell which ones are filled out and which are empty when all those unneeded sub-forms are in every place. One of the changes in this patch is to open up the forms that have values instead of collapsing everything but the first one so you can at least see what is filled out.
Comment #13
damienmckennaAH! Now I totally understand. Thank you.
Comment #14
karens commentedThere was a typo in the previous patch, updating it.
Comment #15
karens commentedAlso, the idea is to make this seamless to anyone not having problems. If you don't select specific groups to display in specific places nothing changes. Everything works as it now does. If you have performance problems you can use this, if you don't you can ignore it.
Comment #16
michelleThe patch in #14 worked for me. It applied cleanly, no errors, and worked as expected. Nice addition.
Comment #17
damienmckennaThanks for the review, Michelle!
Comment #18
damienmckennaComment #19
marysmech commentedPatch #14 works. Thank you.
Comment #20
chr.fritschThis breaks the menu system
Comment #21
carsteng commentedgreat @chr.fritsch.
I was wondering why I cannot see some menu items, but hadn't time to invest.
Comment #22
carsteng commentedSo here is an updated patch with the issue from #20
Comment #23
carsteng commentedComment #24
damienmckennaOut of interest, would it be simpler to have this managed via the field widget settings?
Comment #25
karens commentedThat would only help performance on the field, but there are performance problems on the global forms as well. This patch fixes both.
Comment #26
chr.fritschI think it would be good if it would be possible to configure this also on tag level. We often have the use case that editors want to change the robots.txt settings on node level. But it not necessary to show them all the possibilities of the advanced group.
Comment #27
damienmckenna@chr.fritsch: That'd be way overboard, for that just build a new set of fields and use tokens to fill in the values into the tags.
Comment #28
damienmckennaI've opened two related issues: #2981238: Option to control which meta tag groups are available per entity type/bundle (D7), #2981236: Add test coverage for group configuration
Comment #30
damienmckennaCommitted. Thanks KarenS and everyone for working on this!
Comment #32
martijn de witHaving 2 issues using latest Dev of metatags.
1. After getting the latest dev. I get an stack-trace error the new router metatags.settings can not be found. This can be resolved after a drush CR, but I think more people will run into this issue.
2. At /admin/config/search/metatag/settings is now showing all sub module off the metatag module even when those are not installed. For the Schema metatag module it only shows the modules installed but for the submodules of metatag module it just shows every module. I think the user should only be able to select from the modules that are enabled/installed.
-- edit ---
3. I also notice, all (sub)groups in the metatags field on the add/edit node page are now open by default. So when I open the metatag tab, the page extends extremely because all groups are now open by default. I don't know if it caused by this issues. As UX-experience this is not the ideal situation. I think it would be great if the groups are closed by default.
I tried to open the issue again but i'm not allowed to do. So maybe I should have created a new issue....
Comment #33
kasey_mk commentedThank you. This is tremendously helpful - it makes a huge difference in performance.
On top of that, we have some content types where we want to set the metatag values programmatically based on field values but don't need to allow users to make overrides on individual nodes. I can simply disable the field in the form display or uncheck the schema fields on
admin/config/search/metatag/settingsif I want to leave some of the other overrides available, and usehook_entity_presaveto$entity->set('field_meta_tags', serialize([ TAGS => VALUES ]));Comment #34
tom.moffett commentedHi, I ran into this issue as well, and glad I found that this was fixed via the config, so thanks for that! However, unless I am missing something, the Views section is still having this issue and there is no place to configure the Metatag for Views that I saw. Is this something that can be added?
Comment #35
damienmckennaComment #36
damienmckenna@tom.moffett: Please open a new issue so we can discuss what you're looking for. Thanks.
Comment #37
damienmckenna