Edit media content analysis and focus kw metabox
I'm not the best person to know how the content analysis should work for attachments, by the way seems it is not working on trunk? No JS errors. See below. Worth nothing also on 3.2.5 I get "The text contains 0 words." But I'm not sure what the "text" is supposed to be in an attachment, the caption? the description?


If I remember right text analysis was altogether removed from attachments while back. Not sure what's the current intended status is.
Bug confirmed on WP 4.5.2 with Yoast SEO 3.3-beta5. Milestoned for 3.3.
@Rarst 3.2.5 has the meta box for attachments, so I suppose it should be there and work.
Please inform the customer of conversation # 123361 when this conversation has been closed. User reports that media description is not filling-in the meta description box. User must make custom meta descriptions as a workaround.
Media Description

Meta Description

User also reports that media description area is not being scanned by content/'inhalt' area in Yoast SEO module

Please inform the customer of conversation # 123361 when this conversation has been closed.
This would need a decision: should the analysis work for attachments? /cc @omarreiss
Ideally we would make a version of the analysis tailored to attachments. I think we will probably have separate feedback for the caption and the description. I imagine this means creating a custom set of assessments.The requirements for that aren't clear at all at the moment and I don't see this happening any time soon.
For now, the least we can do is change the current setup to be a bit more compatible with this particular type of content. Added discussing this with Joost to my todo list.
related: https://github.com/Yoast/wordpress-seo/issues/6424
Please inform the customer of conversation # 173028 when this conversation has been closed.
This can easily be solved by changing the source of the content analysis to the description of the attachment.
Looking back at old pending issues. Current state on 11.3-RC3:
- fill all the available fields in the edit image page: alt text, caption, description, enter a meta description
- observe the Analysis results:
Text length: The text contains 0 words.
Wouldn't be better to just not render the Yoast meta box for the attachments? Right now, this is just a non-working UI. /Cc @omarreiss
Stumbled upon this again while testing this WP core change: https://core.trac.wordpress.org/changeset/45925
One more non-functional UI in this page is the "Upload Image" button for Facebook and Twitter. To reproduce:
- make sure the metabox is enabled for attachments: SEO > Search Appearance > Media
- Disable "Redirect attachment URLs to the attachment itself?"
- enable "Yoast SEO Meta Box"
- go to the WordPress Media page in "list mode"
wp-admin/upload.php?mode=list - edit an attachment
- within the metabox, go to Social > Facebook
- click "Upload Image" for the Facebook Image
- nothing happens
Turns out in this page wp.media is undefined so the related JS returns early:
https://github.com/Yoast/wordpress-seo/blob/d1df7768ab8f011c532daeecd82e5d7a43bf2aaa/js/src/wp-seo-admin-media.js#L7-L9
The media JS files are not enqueued because of this check: https://github.com/Yoast/wordpress-seo/blob/995a9ba2d6d34f1c07e5fe1866c139a53609a667/admin/metabox/class-metabox.php#L764-L767
I do realize the recommended setting is to enable "Redirect attachment URLs to the attachment itself?" (thus the metabox is not displayed). However, when users disable it, the meta box is just a non-functional UI.
Just checked, looks like we don't render the metabox on media items anymore. Closing. Curious enough, couldn't find any PR that explicitly stated that this metabox was removed.
@Djennez see last comment 🙂
I do realize the recommended setting is to enable "Redirect attachment URLs to the attachment itself?" (thus the metabox is not displayed). However, when users disable it, the meta box is just a non-functional UI.
The meta box is still rendered, depending on the settings under Search Appearance > Media:
- Redirect attachment URLs to the attachment itself? > No
- Show SEO settings for Media > Show
Ow, my bad. Was afraid it was a setting that would enable this.