Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML Parsing Error #1355

Closed
cpassero opened this issue Nov 10, 2017 · 8 comments

Comments

Projects
None yet
5 participants
@cpassero
Copy link

commented Nov 10, 2017

Sitemap -which has worked fine for years - now has this error

XML Parsing Error: junk after document element
Location: https://www.myremovablestickers.com/sitemap.xml
Line Number 2, Column 1:Warning: pathinfo() expects parameter 1 to be string, array given in /home/content/56/7854656/html/wp-content/plugins/all-in-one-seo-pack/modules/aioseop_sitemap.php on line 2826

^

Here's the content of line 2826 inside webroot / wp-content / plugins / all-in-one-seo-pack / modules / aioseop_sitemap.php

$extn = pathinfo( wp_parse_url( $image, PHP_URL_PATH ), PATHINFO_EXTENSION );

Is there a quick fix I can put in the code line? Any guidance would be appreciated.

@michaeltorbert

This comment has been minimized.

Copy link
Member

commented Nov 10, 2017

The problem you're having is at https://github.com/semperfiwebdesign/all-in-one-seo-pack/blob/master/modules/aioseop_sitemap.php#L2826

Offhand I'd say your images don't have a PHP_URL_PATH for some reason.

We may look at would be pulling out wp_parse_url and checking if the result is a string/not an array, and just return false if so.

Or maybe something along the lines of:
$parsed_url = wp_parse_url( $url ); if ( isset( $parsed_url[ 'PHP_URL_PATH' ] ) ){ return false; }

@cpassero If you don't mind, you can submit your login information to our secure form at https://semperplugins.com/contact/submit-login-information/ so that we can develop and test a solution.

@cpassero

This comment has been minimized.

Copy link
Author

commented Nov 10, 2017

We did try to eliminate images in the sitemap but error continued. We submitted our login info as requested. Thanks.

@cpassero cpassero closed this Nov 10, 2017

@cpassero cpassero reopened this Nov 10, 2017

@EkoJR

This comment has been minimized.

Copy link
Member

commented Nov 10, 2017

By any chance, have you tried saving your permalink structure in Settings > Permalinks? It may correct the URL issues you are having.

@cpassero

This comment has been minimized.

Copy link
Author

commented Nov 10, 2017

I just tried. Saved the same permalink settings and then updated the sitemap. Still a problem. Also tried changing the permalink display settings to include a date in the string. Rebuilt the sitemap. Error remains.

@contactashish13

This comment has been minimized.

Copy link
Contributor

commented Nov 10, 2017

@cpassero could you tell us the PHP and WP versions you are using?

@cpassero

This comment has been minimized.

Copy link
Author

commented Nov 10, 2017

@semperfiwebdesign semperfiwebdesign deleted a comment from cpassero Nov 10, 2017

@semperfiwebdesign semperfiwebdesign deleted a comment from cpassero Nov 10, 2017

@semperfiwebdesign semperfiwebdesign locked and limited conversation to collaborators Nov 10, 2017

@michaeltorbert

This comment has been minimized.

Copy link
Member

commented Nov 10, 2017

@cpassero The short version is that you need to update to at least WP 4.7 (we always recommend updating to the latest version).

For development of this issue: We need to decide if we want to support <4.7 (other than this, it should work all the way back to 4.0), and if so implement a fix like I described above where we take out the component parameter.

@michaeltorbert

This comment has been minimized.

Copy link
Member

commented Nov 17, 2017

PR #1356

@wpsmort wpsmort modified the milestones: 2.4.4, 2.4.5 Jan 11, 2018

@michaeltorbert michaeltorbert assigned wpsmort and unassigned EkoJR Jan 31, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.