YoastSEO.js
YoastSEO.js copied to clipboard
Focus keyword is not recognized in the first paragraph with Divi page builder
What did you expect to happen?
That my focus keyword would be recognized in the first paragraph by our analysis when I use the Divi builder.
What happened instead?
My focus keyword is not recognized.
How can we reproduce this behavior?
Install and activate Divi page builder, create some content and add the focus keyword in the first text block (internal linking in this example). Text read by our plugin (used YoastSEO.app.paper.getText()):
<div class="et_pb_section et_pb_section_0 et_section_regular">
<div class=" et_pb_row et_pb_row_0">
<div class="et_pb_column et_pb_column_4_4 et_pb_column_0">
<div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left et_pb_text_0">
This is the first internal linking paragraph. Hello world. Internal Linking.
This is the second paragraph. However This is your first post. However Edit or delete it, then start writing! Hello world! Youtube cats and a cat might be added in here. However Video's and testing. Thus Test video. However Testing the php error.
<h6>This is the third paragraph. Thus it should be clear that we cannot add any more focus keywords.</h6>
What should be here. Hello world should be here? However, maybe not? Maybe something about a giraffe? When will the Yoast internal linking work?
</div> <!-- .et_pb_text -->
</div> <!-- .et_pb_column -->
</div> <!-- .et_pb_row -->
</div> <!-- .et_pb_section --><div class="et_pb_section et_pb_section_1 et_section_regular">
<div class=" et_pb_row et_pb_row_1">
<div class="et_pb_column et_pb_column_1_4 et_pb_column_1">
<div class="et_pb_button_module_wrapper et_pb_module">
<a class="et_pb_button et_pb_button_0 et_pb_module et_pb_bg_layout_light" href="http://google.nl">google</a>
</div>
</div> <!-- .et_pb_column --><div class="et_pb_column et_pb_column_1_4 et_pb_column_2">
<div class="et_pb_module et-waypoint et_pb_image et_pb_animation_left et_pb_image_0 et_always_center_on_mobile">
<img src="http://local.wordpress.dev/wp-content/uploads/2016/12/Avatar_Ben_500x500.png" alt="internal linking avatar" />
</div>
</div> <!-- .et_pb_column --><div class="et_pb_column et_pb_column_1_4 et_pb_column_3">
<div class="et_pb_search et_pb_module et_pb_bg_layout_light et_pb_text_align_left et_pb_search_0">
<form role="search" method="get" class="et_pb_searchform" action="http://local.wordpress.dev/">
<div>
<label class="screen-reader-text" for="s">Search for:</label>
<input type="text" value="" name="s" class="et_pb_s">
<input type="hidden" name="et_pb_searchform_submit" value="et_search_proccess" />
<input type="hidden" name="et_pb_include_posts" value="yes" />
<input type="hidden" name="et_pb_include_pages" value="yes" />
<input type="submit" value="Search" class="et_pb_searchsubmit">
</div>
</form>
</div> <!-- .et_pb_text -->
</div> <!-- .et_pb_column --><div class="et_pb_column et_pb_column_1_4 et_pb_column_4">
<div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left et_pb_text_1">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div> <!-- .et_pb_text -->
</div> <!-- .et_pb_column -->
</div> <!-- .et_pb_row -->
</div> <!-- .et_pb_section -->
Technical info
- Platform: WordPress
- Platform version: 4.7
- Yoast SEO version: 4.0.1
- Divi: 3.0.15
I've been able to reproduce this. It seems the output from Divi isn't parsed correctly to the content. In the example above there are a bunch of closing div tags without opening tags.
Something in the parsing to the content seems to go wrong, we should check if this is because broken HTML or something else.
Please inform the customer of conversation # 406503 when this conversation has been closed.
1.Add Focus Keyword in first paragraph without using modules
2.See warning that Yoast cannot see keyword in first paragraph
3.Deactivate Divi
4.See Yoast finds keyword in First paragraph
JS Errors
on users site
Uncaught TypeError: Cannot read property 'model' of undefined
on Yoast demo site
Uncaught TypeError: Cannot read property 'searchSuggestions' of undefined
Deactivate Divi and see no JS Errors (on demo site)
Tech Specs Divi: 3.0.90 (Yoast's version on Demo; even without adding modules) AND 3.10.1 (users version) Yoast SEO: 7.8.1
Please inform the customer of conversation # 403995 when this conversation has been closed.
Please inform the customer of conversation # 495254 when this conversation has been closed.
Please inform the customer of conversation # 527114 when this conversation has been closed.
Yoast SEO may fail to detect the focus keyphrase in the first paragraph if there's an indented <div>
block before the first <p>
. See comment https://github.com/Yoast/wordpress-seo/issues/7960#issuecomment-497650183
Please inform the customer of conversation # 565677 when this conversation has been closed.
Please inform the customer of conversation # 645027 when this conversation has been closed.
Please inform the customer of conversation # 656300 when this conversation has been closed.
Please inform the customer of conversation # 656830 when this conversation has been closed.
related https://github.com/Yoast/featurerequests/issues/224