s06e02 - XML Sitemaps SUPPORT / QUESTIONS

Open to all! Ask other shopowners for help.
Dnj1964
Member
Posts: 54
Joined: Fri Nov 06, 2020 8:27 pm
Phoenix Version:
Has thanked: 8 times

Re: XML errors saving products

Post by Dnj1964 »

Omar_one wrote: Thu Nov 18, 2021 7:27 pm I changed this lines in /includes/hooks/admin/catalog/XML_writer.php (I am not sure if this right but the error not shown any more)

Code: Select all

public function listen_updateProductAction() {
    listen_productActionSave();
  }

  public function listen_insertProductAction() {
    listen_productActionSave();
  }
to this

Code: Select all

 public function listen_updateProductAction() {
     xml_writer::do_XML('products');
  }

  public function listen_insertProductAction() {
     xml_writer::do_XML('products');
       }
Thanks, I will give that a try.

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: XML errors saving products

Post by ecartz »

Code: Select all

public function listen_updateProductAction() {
    listen_productActionSave();
  }

  public function listen_insertProductAction() {
    listen_productActionSave();
  }
should be

Code: Select all

public function listen_updateProductAction() {
    $this->listen_productActionSave();
  }

  public function listen_insertProductAction() {
    $this->listen_productActionSave();
  }
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

s06e02 - XML Sitemaps SUPPORT / QUESTIONS

Post by heatherbell »

Addon:
Adds XML sitemaps to your Phoenix, which is good for SEO etc

Download:
viewtopic.php?f=28&t=157


--


Just installed this on v1.0.8.8
After installation /XML_index.php shows:
Screenshot 2022-06-21 072653.png
In fact, the rest of the screen is blank.

Source code for the page shows:

Code: Select all

 <?xml version="1.0" encoding="utf-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://XXXX.com/XML_categories_1.xml</loc>
  </sitemap>
  <sitemap>
    <loc>https://XXXX.com/XML_manufacturers_1.xml</loc>
  </sitemap>
  <sitemap>
    <loc>https://XXXX.com/XML_products_1.xml</loc>
  </sitemap>
</sitemapindex>
Is the error in the screen-shot expected and the page code correct?
You do not have the required permissions to view the files attached to this post.
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: s06e02 - XML Sitemaps

Post by ecartz »

I think that the problem is the space at the beginning.

I checked the current version of the file and it shouldn't create anything like that. And doesn't on my test site. Have you made any modifications to it? Could be an upload artifact -- check the file to see if it has a space before the <?php line at the beginning.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: s06e02 - XML Sitemaps

Post by heatherbell »

ecartz wrote: Tue Jun 21, 2022 7:51 am I think that the problem is the space at the beginning.

I checked the current version of the file and it shouldn't create anything like that. And doesn't on my test site. Have you made any modifications to it? Could be an upload artifact -- check the file to see if it has a space before the <?php line at the beginning.
No modifications made - just uploaded and installed on a site this morning.
To confirm I am using the latest S06e02-1.0.8.5.zip
Interestingly, I have just uploaded and installed on a different demo 1.0.8.8 and get the same error.
However, uploaded and installed on a demo 1.0.8.15 without any error.
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: s06e02 - XML Sitemaps

Post by ecartz »

heatherbell wrote: Tue Jun 21, 2022 8:30 am Interestingly, I have just uploaded and installed on a different demo 1.0.8.8 and get the same error.
However, uploaded and installed on a demo 1.0.8.15 without any error.
The space before the <?php could be in any file loaded prior to the output. It's possible that it was a bug in 1.0.8.8 that was later fixed. But without an issue like this, it is unlikely that I'd remember such a thing. I'd remove the excess space if I saw it, even without a known issue. If you have command line access, you could try

Code: Select all

grep -RIP '^ <\?php' *
https://stackoverflow.com/a/1533192/6660678

Another alternative is that a file with an ending ?> might have a space after it. Which is why ending ?> are not recommended in files without output.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: s06e02 - XML Sitemaps

Post by heatherbell »

@ecartz Many thanks for taking the time to look and advise.
Have not discovered the reason behind my observation but just seen in google console that it is still processing XML_index.php and discovering the sitemaps OK so this is a non-issue.
artfulweb
Contributor
Posts: 184
Joined: Thu Oct 29, 2020 12:34 pm
Phoenix Version: v1.1.0.6
Has thanked: 29 times
Been thanked: 14 times

Re: s06e02 - XML Sitemaps

Post by artfulweb »

Hi,
I have been using Google XML Sitemaps for years and my maps are indexed with Google as :
sitemapcategories, sitemapindex, sitemapmanufacturers, sitemapspecials, etc.

Is there a way to change the output of the S06E02 addon to use these names instead of the XML_ naming so as to maintain my sitemaps already referenced? Thanks in advance.
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: s06e02 - XML Sitemaps

Post by burt »

artfulweb wrote: Fri Jul 08, 2022 10:59 am Is there a way to change the output of the S06E02 addon to use these names instead of the XML_ naming so as to maintain my sitemaps already referenced? Thanks in advance.
Look through the code where anything that references FILES called XML_* exists and change it "XML_" to "sitemap". Do not change any constant definitions.

This may be a job for a Certified Developer if you cannot manage it yourself. It should be a 30 minute task.
I am not here to build for you.
I am here to build with you. Let's help each other.
artfulweb
Contributor
Posts: 184
Joined: Thu Oct 29, 2020 12:34 pm
Phoenix Version: v1.1.0.6
Has thanked: 29 times
Been thanked: 14 times

Re: s06e02 - XML Sitemaps

Post by artfulweb »

burt wrote: Fri Jul 08, 2022 12:41 pm
artfulweb wrote: Fri Jul 08, 2022 10:59 am Is there a way to change the output of the S06E02 addon to use these names instead of the XML_ naming so as to maintain my sitemaps already referenced? Thanks in advance.
Look through the code where anything that references FILES called XML_* exists and change it "XML_" to "sitemap". Do not change any constant definitions.

This may be a job for a Certified Developer if you cannot manage it yourself. It should be a 30 minute task.

Alas, changing any code called XML_* to "sitemap" does not work, it still generated XML_ . Must be something else that as to be modified. Will keep playing with it.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply