• Resolved interactivebonnier

    (@interactivebonnier)


    I’ve enabled the https://wordpress.org/plugins/xml-sitemap-feed/ plugin in a WP4.5.2 with polylang environment. Its based on themosis framework.

    When i enter the XML sitemap settings and change anything, it gives me this response-error “only variables should be passed by reference” – is that caused by incompatibility somehow?

    Errorpage:
    Unhandled Exception

    Message:

    Only variables should be passed by reference
    Location:

    /home/forge/staging-productsearch.interactives.dk/htdocs/content/plugins/xml-sitemap-feed/includes/admin.php on line 752
    Stack Trace:

    #0 /home/forge/staging-productsearch.interactives.dk/htdocs/content/mu-plugins/themosis-framework/bootstrap/start.php(175): Themosis\Error\Error::native(2048, ‘Only variables …’, ‘/home/forge/sta…’, 752)
    #1 /home/forge/staging-productsearch.interactives.dk/htdocs/content/plugins/xml-sitemap-feed/includes/admin.php(752): THFWK_Themosis->{closure}(2048, ‘Only variables …’, ‘/home/forge/sta…’, 752, Array)
    #2 [internal function]: XMLSF_Admin->sanitize_custom_sitemaps_settings(Array)
    #3 /home/forge/staging-productsearch.interactives.dk/htdocs/cms/wp-includes/plugin.php(235): call_user_func_array(Array, Array)
    #4 /home/forge/staging-productsearch.interactives.dk/htdocs/cms/wp-includes/formatting.php(3882): apply_filters(‘sanitize_option…’, Array, ‘xmlsf_custom_si…’, Array)
    #5 /home/forge/staging-productsearch.interactives.dk/htdocs/cms/wp-includes/option.php(413): sanitize_option(‘xmlsf_custom_si…’, Array)
    #6 /home/forge/staging-productsearch.interactives.dk/htdocs/cms/wp-includes/option.php(304): add_option(‘xmlsf_custom_si…’, Array, ”, ‘yes’)
    #7 /home/forge/staging-productsearch.interactives.dk/htdocs/cms/wp-admin/options.php(215): update_option(‘xmlsf_custom_si…’, ”)
    #8 {main}

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author Rolf Allard van Hagen

    (@ravanh)

    Which plugin version are you using? There is no /xml-sitemap-feed/includes/admin.php in 4.7…

    Plugin Author Rolf Allard van Hagen

    (@ravanh)

    It looks like you are using an older version but upgrading will probably not change the PHP Strict Warning.

    Could you try the following:

    Open xml-sitemap-feed/includes/admin.php in the WordPress plugin editor and search with Ctrl+F for:

    if(is_array($new)) $new = array_shift(array_filter($new));

    You’ll see there are four instances of that same line. Now replace each instance with:

    if(is_array($new)) {
    	$new = array_filter($new);
    	$new = reset($new);
    }

    Let me know if that resolves the error šŸ™‚

    Thread Starter interactivebonnier

    (@interactivebonnier)

    Hi again, i updated to plugin-version 4.7.1 and inserted the changes to the file: xml-sitemap-feed/includes/class-xmlsitemapfeed-admin.php

    And it removed the error message, so that part is great! Thanks.

    The reason why I wanted to change the plugin-settings, was to add additional domains to the sitemap, but that doesn’t seem to happen. I have a WP site with Polylang, which has 4 languages determined by 4 domains:
    staging-productsearch.interactives.dk (primary sitedomain)
    staging-productsearch-se.interactives.dk
    staging-productsearch-no.interactives.dk
    staging-productsearch-fi.interactives.dk

    I need a XML sitemap URL per domain to feed into GWT. Is this possible at all? When i enter these 3 additional domains into “Allowed domains” box, but i fear that country-items will only be added to the same sitemap-url and not get it’s own.

    Anyhow, after adding the extra three domains to the allowed domains list, i looked at the sitemap and it hasn’t changed anything. The other domains articles are not a part of it, and it still says “Last changed” yesterday. Maybe it’s internally run once a day?
    http://staging-productsearch.interactives.dk/sitemap.xml

    My goal is to have a:
    http://staging-productsearch-se.interactives.dk/sitemap.xml
    http://staging-productsearch-no.interactives.dk/sitemap.xml
    http://staging-productsearch-fi.interactives.dk/sitemap.xml

    Thread Starter interactivebonnier

    (@interactivebonnier)

    Well, reading the updated sitemap was solved by adding a ?blahblah after the http://staging-productsearch.interactives.dk/sitemap.xml – so it actually includes the other domain articles into the same XML Sitemap URL.

    Is it possible to get separate URL, one for each domain/language configured in Polylang?

    Thread Starter interactivebonnier

    (@interactivebonnier)

    I don’t think I can get about only having one sitemap.xml url with all subdomain urls, according this page: http://www.microsystools.com/products/sitemap-generator/help/multiple-domains-xml-sitemaps/
    and this one: http://www.sitemaps.org/protocol.html#location

    @ravanh, is this something i need to address at Polylang forum or is it correct here at your plugin-forum?

    Plugin Author Rolf Allard van Hagen

    (@ravanh)

    Hi interactivebonnier,

    Is it possible to get separate URL, one for each domain/language configured in Polylang?

    No, the plugin is designed to put all languages into the same sitemap. If you look at http://staging-productsearch.interactives.dk/sitemap-posttype-review.xml you’ll notice multiple language URLs are in there. As long as the domains are all verified via your GWT account, these should all be accepted by the search eninge.

    Plugin Author Rolf Allard van Hagen

    (@ravanh)

    And according to http://www.sitemaps.org/protocol.html#sitemaps_cross_submits you can prove (implicitly) that all subdomains belong to you via robots.txt which is already done by the plugin. Notice how each language subdomain robots.txt points to the main sitemap index on the main subdomain, for example http://staging-productsearch-no.interactives.dk/robots.txt sais

    Sitemap: http://staging-productsearch.interactives.dk/sitemap.xml

    Plugin Author Rolf Allard van Hagen

    (@ravanh)

    In any case, make sure you have a Google Search Console (GWT) account, submit all your language subdomain site versions, verifying each one. Then submit your main sitemap index there too. This will allow you to monitor the indexing of your URLs.

    If you notice that only the main domain gets indexed, please let me know šŸ™‚

    Thread Starter interactivebonnier

    (@interactivebonnier)

    Great, i will try this and hopefully have it verified in GWT. Will return with answer.

    Plugin Author Rolf Allard van Hagen

    (@ravanh)

    Thanks! Your experience and feedback is highly appreciated šŸ™‚

    Thread Starter interactivebonnier

    (@interactivebonnier)

    @ravanh, i’m still working with my SEO colleague on testing if XML sitemap “all inclusive” in enough for GWT.
    But I have another question: the fix you suggested topwise of this thread, will that be included in a future release of your plugin or am I supposed to include this manually everytime you update the plugin?

    Plugin Author Rolf Allard van Hagen

    (@ravanh)

    The fix will be included in the next version šŸ™‚

    Thread Starter interactivebonnier

    (@interactivebonnier)

    hi again, I have installed your plugin on our productionsite now and it produces a sitemap.xml (http://test.komputer.dk/sitemap.xml), but i miss some info in it:
    sitemap-home.xml only includes one of the domains (test.komputer.dk), but i’ve registered other domains within polylang: test.komputer.no, test.pctidningen.se and testit.kotimikro.fi.
    sitemap-posttype-review.xml seems fine, it seems to include all reviews from all four domains.
    sitemap-taxonomy-brand.xml only includes “brands” from one domain, test.komputer.dk (i think this is our own fault)
    sitemap-taxonomy-review_type.xml includes correct paths from different domains.

    Lastly GWT’s testtool also complains about the sitemap (in danish though):
    http://send.digital/shares/54a91c5a-ed58-c8ff-8221-85c7c08939e4
    it says something about “Fejl” = “error” and “Denne webadresse er ikke tilladt for et Sitemap pĆ„ dette sted” = “This webaddress are not allowed for a sitemap here.”. Is that because of our robots.txt setup on the site? It seems to allowed and point sitemap to http://test.komputer.dk/sitemap.xml

    Hi again, did you add all additional domains in the Allowed Domains field under the XML Sitemap options on Settings > Reading?

    Thread Starter interactivebonnier

    (@interactivebonnier)

Viewing 15 replies - 1 through 15 (of 22 total)

The topic ‘Issue with XML plugin or combined with other plugins?’ is closed to new replies.