YoastSEO.js icon indicating copy to clipboard operation
YoastSEO.js copied to clipboard

Focus keyword is not recognized in the first paragraph with Divi page builder

Open benvaassen opened this issue 8 years ago • 12 comments

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&nbsp;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.&nbsp;Hello world should be here?&nbsp;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

benvaassen avatar Dec 20 '16 14:12 benvaassen

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.

terw-dan avatar Dec 23 '16 10:12 terw-dan

Please inform the customer of conversation # 406503 when this conversation has been closed.

Pcosta88 avatar Jul 17 '18 18:07 Pcosta88

1.Add Focus Keyword in first paragraph without using modules

screen shot 2018-07-18 at 9 59 37 am

2.See warning that Yoast cannot see keyword in first paragraph

screen shot 2018-07-18 at 9 59 50 am

3.Deactivate Divi

4.See Yoast finds keyword in First paragraph

screen shot 2018-07-18 at 10 03 36 am

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 screen shot 2018-07-18 at 10 01 15 am

Deactivate Divi and see no JS Errors (on demo site)

screen shot 2018-07-18 at 10 03 58 am

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

Pcosta88 avatar Jul 18 '18 14:07 Pcosta88

Please inform the customer of conversation # 403995 when this conversation has been closed.

Pcosta88 avatar Jul 18 '18 14:07 Pcosta88

Please inform the customer of conversation # 495254 when this conversation has been closed.

Pcosta88 avatar Apr 16 '19 17:04 Pcosta88

Please inform the customer of conversation # 527114 when this conversation has been closed.

amboutwe avatar Jul 25 '19 19:07 amboutwe

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

monbauza avatar Jul 29 '19 10:07 monbauza

Please inform the customer of conversation # 565677 when this conversation has been closed.

monbauza avatar Dec 05 '19 11:12 monbauza

Please inform the customer of conversation # 645027 when this conversation has been closed.

Pcosta88 avatar Sep 03 '20 14:09 Pcosta88

Please inform the customer of conversation # 656300 when this conversation has been closed.

Pcosta88 avatar Oct 06 '20 12:10 Pcosta88

Please inform the customer of conversation # 656830 when this conversation has been closed.

Pcosta88 avatar Oct 12 '20 18:10 Pcosta88

related https://github.com/Yoast/featurerequests/issues/224

Pcosta88 avatar Feb 12 '21 16:02 Pcosta88