Verify that the Views integration works correctly with respect to the internal APIs and is consistent with the other submodules.

Comments

rollingnet’s picture

I configured the default views' settings in /admin/config/search/metatags/config/view, but, if I use "using defaults" option in a view's metatag setting, global settings are used, not default views' ones.
I have to set metatags in a specific view in order that global settings were overriden for view.

moonray’s picture

Version: 7.x-1.x-dev » 7.x-1.13
Category: Task » Bug report

Metatag views doesn't seem to be working correctly (as @rollingnet above mentions). The metatags for a view are only output when the individual view has settings that override the global view settings.

Steps to reproduce:
1. Don't change any of the default metatag settings.
2. Create a view and give it a description. Make sure it has a page with a url. Don't override any default metatag settings.
3. Go to the view page. Notice that it doesn't include the description metatag.

As soon as you override the default metatag settings for the view (e.g. add an ! to the end of [view:description]) the description metatag will show up on the view's page.

moonray’s picture

Version: 7.x-1.13 » 7.x-1.x-dev

Oops, changed version.

dydave’s picture

Hi guys,

I found this issue's title pretty confusing, and thought it would actually include the problem with Views default configuration being ignored, but also perhaps more problems....

So I created a child issue with a patch: #2728929: Views Meta Tags Default/Global configuration is ignored.

Not sure if it is a duplicate... but the testing steps clearly outlined by @moonray (thanks very much for @moonray's comment, it helped greatly understanding the problem here) in #2 are pretty much the same as the ones I outlined in child issue.

To me, this issue's summary is actually pretty vague and general, so I guessed it might account for more work than just the default configuration feature.

In any case, the patch at #2728929-2: Views Meta Tags Default/Global configuration is ignored should provide an initial response to #1, #2, and I certainly invite you to test further and give your feedback, it would surely be grealy appreciated.

Feel free to let me know if you would have any comments, questions, issues, suggestions, objections or ideas on the child issue, I would certainly be glad to provide more information.
Thanks very much in advance for everyone's testing/reporting, reviews and comments.

damienmckenna’s picture

The issue was made vague on purpose as I wanted to do a review of the code and make sure it was both working correctly and following the same API workflow as other submodules, and I wasn't sure what that would lead to.

damienmckenna’s picture

Status: Active » Postponed
Parent issue: » #2730693: Decide how all submodules should work
dydave’s picture

Hi @DamienMcKenna,

Thanks a lot for your kind comments and getting back so quickly on the Views/Facet API related issues, you're really amazing.
Thanks also very much for committing two patches of the related issues, it's just fewer obstacles for us towards making the Facet API tokens functional.

Indeed, I had a feeling you created this issue without a very precise idea in mind (on purpose), probably to include various aspects. I definitely understand why you let the title and summary a bit "loose", which is also why I was hesitant to submit the patch for Views Meta Tags defaults being ignored (in response to #1 and #2) in this ticket and created another related one (#2728929: Views Meta Tags Default/Global configuration is ignored).

The metatag module has changed and grown so much (since I first worked on integrating with Facet API tokens), especially absorbing submodules, that I guess I just don't have the necessary distance and understanding of all the defaults/global behaviors. It might take me some more time to re-adjust my overall vision of the module.

I will certainly keep following this issue and the related ones, in particular #2730693: Decide how all submodules should work, and see if there's anything I could do to help at any point.

Once again, thank you very much for your feedback and the great work carried on the module.
Cheers!

RobKoberg’s picture

I am using a freshly installed drupal 8. When viewing a basic_page node's source, the meta tags for title and description are populated correctly in the HTML/HEAD.
The meta tag for Page title has the value of [current-page:title] | [site:name]
The meta tag for Description has the value of [node:summary]

Next I created a view with three displays:

  • the entity rendered as an HTML page,
  • the entity rendered as JSON,
  • the entity's fields (title, body, changed, id, and meta tags) rendered as json

None of these display the meta tags correctly.

  • the entity rendered as an HTML page only renders the title element with the content | Lightning
  • the entity rendered as JSON renders "field_meta_tags":[{"value":"a:1:{s:5:\u0022title\u0022;s:34:\u0022[current-page:title] | [site:name]\u0022;}"}]
  • the fields rendered as json renders (field_meta_tags is aliased as meta) "meta":""
damienmckenna’s picture

@RobKoberg: Please open a new issue for that, it has nothing to do with Metatag:View in D7. Thanks.