Support » Plugin: Transposh WordPress Translation » Tranposh Make WordPress Seo By Yoast Sitemap XML-Pages Blank

  • Hi, I tried it for a long time, when I deactivate the “Transposh” plugin the Yoast XML Sitemaps displays without any problem, but when I activated the plugin it get a blank page on all sitemap and on …/post-sitemap.xml I get an error:
    This page contains the following errors:

    error on line 1 at column 2: StartTag: invalid element name
    Below is a rendering of the page up to the first error.“.

    So I don’t know how to solve it.. Does anyone can help?

    Thanks.

    https://wordpress.org/plugins/transposh-translation-filter-for-wordpress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ve got a similar issue. Seems in the latest version there is some encrypted message by the author to see the code for instruction on integrating transposh with WP SEO by Yoast. I found the instructions which were to be a simple copy and past but when I implemented it I got a white screen. I’ve asked in these forums and on transposh.net but never get a response.

    Is there a manual for this plug in — detailed documentation… crawling through forum posts 3 and 5 years old does little good 🙁

    Here’s the way. There is an error in the copy-paste that I will report to the developers.
    If you have a look at plugins/transposh/wp/transposh_3rdparty.php you’ll notice this (line 216):

    /**
    * This function integrates with yoast sitemap generator, and adds for each viewable language, the rest of the languages url
    * Also – priority is reduced by 0.2
    * And this requires the following patch in class-sitemaps.php
    * For future yoast versions, and reference, look for this function:
    if ( ! in_array( $url[‘loc’], $stackedurls ) ) {
    // Use this filter to adjust the entry before it gets added to the sitemap
    $url = apply_filters( ‘wpseo_sitemap_entry’, $url, ‘post’, $p );
    if ( is_array( $url ) && $url !== array() ) {
    $output .= $this->sitemap_url( $url );
    $stackedurls[] = $url[‘loc’];
    }
    }

    And change to:

    if ( ! in_array( $url[‘loc’], $stackedurls ) ) {
    // Use this filter to adjust the entry before it gets added to the sitemap
    $url = apply_filters( ‘wpseo_sitemap_entry’, $url, ‘post’, $p );
    if ( is_array( $url ) && $url !== array() ) {
    $output .= $this->sitemap_url( $url );
    $stackedurls[] = $url[‘loc’];
    }
    $langurls = apply_filters( ‘wpseo_sitemap_language’,$url);
    if ( is_array( $langurls )) {
    foreach ($langurls as $langurl) {
    $output .= $this->sitemap_url( $langurl );
    }
    }

    But there is an error in the code provided (missing bracket). This is the working code:

    if ( ! in_array( $url['loc'], $stackedurls ) ) {
            // Use this filter to adjust the entry before it gets added to the sitemap
            $url = apply_filters( 'wpseo_sitemap_entry', $url, 'post', $p );
    			if ( is_array( $url ) && $url !== array() ) {
    			  $output .= $this->sitemap_url( $url );
    			  $stackedurls[] = $url['loc'];
    			}
    		} // ******* this one was missing
    
            $langurls = apply_filters( 'wpseo_sitemap_language',$url);
            if ( is_array( $langurls )) {
              foreach ($langurls as $langurl) {
              $output .= $this->sitemap_url( $langurl );
            }
          }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Tranposh Make WordPress Seo By Yoast Sitemap XML-Pages Blank’ is closed to new replies.