Yoast / wordpress-seo

Yoast SEO for WordPress
https://yoast.com/wordpress/plugins/seo/
Other
1.77k stars 893 forks source link

The keyword does not appear in the first paragraph #10256

Closed Kinetikon01 closed 6 years ago

Kinetikon01 commented 6 years ago

The plugin is displaying "The keyword does not appear in the first paragraph", when the keyword is, in fact, in the first paragraph. I checked the other issues and tried the proposed solutions, but none of it worked so far.

I really tried everything: checked the grammar, the capital letters, I checked the code and everything was in place and there is no image in that page so that can't be the case. I even tried to put

and

on the first paragraph, but still, the keyword is not being recognized in the first paragraph

image image

p.s.: also, sometimes the keyword count is not right and when it happens it's always higher.

Technical info:

benvaassen commented 6 years ago

Thanks for reporting this issue.

We'll need to know if this behaviour is caused by a conflict with a plugin or theme. Therefore we want to ask you to do the following:

If it still occurs:

If it doesn't occur anymore:

If the problem reoccurred after reactivating one of your plugins, please add that information to your bug report.

You can also use the Health Check plugin to check for conflicts (how to check for plugin conflicts).

Thanks!

Kinetikon01 commented 6 years ago

Thank you for your reply.

So, I did as you asked and the issue still occured.

benvaassen commented 6 years ago

Can you provide me with the content of the post/page and with the focus keyword you entered? That way I can try to reproduce it.

Kinetikon01 commented 6 years ago

Sure, you can check the content here: https://www.kinetikon.com/formazione/corsi/ansible/ and the keyword is "Ansible". And here's a screenshot of whatt is going on, where the first red bullet is saying "The keyword does not appear in the first paragraph" image

benvaassen commented 6 years ago

I copied the contents:

<h4>Descrizione</h4>
Il corso di Ansible fornisce tutte le informazioni e le tecniche specifiche per capire la prototipazione dei server e l’automazione dei servizi usando il software, attraverso il linguaggio semplice che lo contraddistingue.
<h4>Obiettivi</h4>
Il corso mira a far conoscere ed approfondire la collocazione di Ansible e Ansible Tower all’interno dei processi IT, l’uso di Ansible per l’esecuzione di comandi ad-hoc, la creazione di playbook e workflow complessi, l’installazione e la configurazione di AWX per la gestione grafica e l’automazione dei playbook.
<h4>Conoscenze in uscita</h4>
Al termine del corso i partecipanti avranno le seguenti competenze:
<ul>
    <li>Teoriche: architettura di Ansible e AWX, principi fondamentali di automazione con Ansible</li>
    <li>Pratiche: installazione e configurazione di Ansible e AWX. Creazione, gestione e automazione di workflow sia tramite l’interfaccia a riga di comando, sia tramite l’interfaccia web (AWX).</li>
</ul>
<h4>Programma didattico</h4>
<ul>
    <li>Presentazione di Ansible e AWX nel contesto dell’automation e orchestration.</li>
    <li>Installazione e configurazione di base</li>
    <li>Utilizzo dei comandi ad-hoc</li>
    <li>Gestione dell’inventario e personalizzazione delle opzioni</li>
    <li>Creazione di playbook semplici</li>
    <li>Creazione di playbook complessi e definizione di ruoli</li>
    <li>Uso di condizionali e template</li>
    <li>Installazione dell’interfaccia web (AWX)</li>
    <li>Gestione e automazione dei playbook attraverso l’interfaccia web</li>
    <li>Delegazione dei playbook attraverso l’interfaccia web</li>
</ul>

And when I use the focus keyword ansible, I get a green bullet. I'm guessing there is some (HTML) code in the way of our analysis on your site. Can you copy the content of the Text field when you edit the post/page? See image:

textcontent

Kinetikon01 commented 6 years ago

So, I used some Advanced Custom Fields to build those kind of pages, so i really didn't write the text direclty in worpress. So my code looks like this:

[av_textblock size='' font_color='' color='' av-medium-font-size='' av-small-font-size='' av-mini-font-size='' av_uid='av-xu59l2' custom_class='' admin_preview_bg='']

Descrizione

[acf field ='c_descrizione']

Obiettivi

[acf field ='c_obiettivi']

Conoscenze in uscita

[acf field ='c_conoscenze_in_uscita']

Programma didattico

[acf field ='c_programma_didattico'] [/av_textblock]

image

But when I deactivated the Advanced Custom Fields, the problem was still there, so I guess this is not the issue? Thanks for replying

benvaassen commented 6 years ago

Have you installed the ACF content analysis for Yoast SEO? I think that should resolve the issue you have. Can you let me know?

Kinetikon01 commented 6 years ago

Yes, that plugin is installed and I just updated it as well, but the problem is still occurs.

benvaassen commented 6 years ago

Okay, so let me rephrase my first comment. Can you only have ACF content analysis for Yoast SEO, ACF and Yoast SEO active with the theme Twenty Seventeen and check if the issue persists? I've just tested this, with your text example and it works on my end with those 3 plugins active and a default theme.

richb-hanover commented 6 years ago

I have seen the same thing - the text is clearly present in the first paragraph.

I read through this thread, but have not disabled all other plugins or themes. I'm hopeful this is enough information for you to give me a hint. (I could also try this on a dev. site, if you thought that would be important.) Thanks!

Kinetikon01 commented 6 years ago

The theme I am using at the moment is Enfold, which is a default theme, and the issue still persist, even with only those plug in active. Instead of ACF plug in though, I am using WP All Import - ACF Add-On.

benvaassen commented 6 years ago

Enfold isn't a default WordPress theme (it's not even in the WordPress.org repository) and most likely the cause of the issue. As for @richb-hanover, for you, it's most likely Beaver Builder and perhaps also your theme.

The problem is that something else is seen as the first paragraph because the page builder is actually outputting some code before the first paragraph.

@Kinetikon01 Please use Twenty Seventeen to test the issue.

richb-hanover commented 6 years ago

Thanks for the speedy response.

As for @richb-hanover, for you, it's most likely Beaver Builder and perhaps also your theme. The problem is that something else is seen as the first paragraph because the page builder is actually outputting some code before the first paragraph.

Yes, I'm sympathetic to the hassles of other themes/page builders. Is there a way to discover what Yoast SEO "sees" as the first paragraph?

I ask because the first \

tag on https://lochlymelodge.com/country-wedding/ does indeed include the focus keyword "country wedding". Many thanks.

benvaassen commented 6 years ago

@richb-hanover thanks for the sympathy :) you can see what Yoast scans in the analysis by opening up the console (you can press control+shift+j on Windows or command+option+j on Mac) and typing YoastSEO.app.paper.getText() in the console tab and pressing enter. This will show the content that will be analyzed by us. You should be able to see what's in the first paragraph then.

@Kinetikon01 Have you used Twenty Seventeen to test the issue?

Kinetikon01 commented 6 years ago

The problem is that whatever theme I use, I can't test it beacause by deactivating the ACF the content I need to test the issue on, disappear. In any case, I did try what check what Yoast was recognizing as the first paragraph and this is what happened: image I hope this can help

richb-hanover commented 6 years ago

... you can see what Yoast scans in the analysis by opening up the console (you can press control+shift+j on Windows or command+option+j on Mac) and typing YoastSEO.app.paper.getText() in the console tab and pressing enter.

Cool beans! Here's what I see.

<p><img src='http://lochlymelodge.com/wp-content/uploads/2018/02/LLLWedding2048-1365.jpg' alt=''></img>
    <br></br><img src='http://lochlymelodge.com/wp-content/uploads/2018/04/Wedding1-2048x500.jpg' alt=''></img>
    <br></br><img src='https://lochlymelodge.com/wp-content/uploads/2018/07/ErnieBarb_Party_2000.jpg' alt=''></img>
    <br></br><img src='http://lochlymelodge.com/wp-content/uploads/2018/04/Wedding6.jpg' alt=''></img>
    <br></br><img src='http://lochlymelodge.com/wp-content/uploads/2018/04/Wedding3-2048x1356.jpg' alt=''></img>
    <br></br><img src='http://lochlymelodge.com/wp-content/uploads/2018/04/Wedding5-1.jpg' alt=''></img>
    <br></br><img src='http://lochlymelodge.com/wp-content/uploads/2018/04/Wedding-7-1.jpg' alt=''></img>
    <br></br>
    <a href='#' aria-label='previous' aria-role='button'>
        <br></br>
    </a>
    <br></br>
    <a href='#' aria-label='next' aria-role='button'>
        <br></br>
    </a>
</p>
<h1>Country Weddings at Loch Lyme Lodge</h1>
<p>Did you ever dream of getting married in a beautiful setting, next to a crystal clear lake, with your friends and family in attendance, all able to walk down to the ceremony from their own cabin in the woods? Your dream of a country wedding can come true!</p>
... more...

That first \

paragraph contains the images and links for the image slider at the top of https://lochlymelodge.com/weddings/

I wonder if your "first paragraph" algorithm could be tweaked to select the first paragraph that has text, or perhaps the first \

tag that has something other than image, a-href, or formatting and other non-texty tags.

(Having been a programmer in a previous life, I realize that it's easy for me to propose things, and tricky for you to implement. But I hope you'll consider this thought. Thanks!)

benvaassen commented 6 years ago

We are actually working on improving the first paragraph keyword matching here https://github.com/Yoast/YoastSEO.js/issues/994. Therefore, I'm gonna close this as it seems to be a duplicate of that issue.

Thank you for your help :-)