Zen Cart Logo

SitemapXML v.2

Views: 613,213

Results 2,021 to 2,040 of 2,226
16 May 2021, 6:22 AM
#2021
shrimp_gumbo_mmmhhh avatar

shrimp_gumbo_mmmhhh

Totally Zenned

Join Date:
Jun 2007
Location:
Texas, USA
Posts:
1,436
Plugin Contributions:
0

SitemapXML v.2

Got a debug log for sitemapxml.... PHP Fatal error: Uncaught Error: Call to undefined function zen_admin_demo() in /sitemapxml.php:35

16 May 2021, 7:29 AM
#2022
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: SitemapXML v.2

shrimp-gumbo-mmmhhh:

Got a debug log for sitemapxml.... PHP Fatal error: Uncaught Error: Call to undefined function zen_admin_demo() in /sitemapxml.php:35
Yeah, that's code that got removed from Zen Cart 1.5.7 (the function zen_admin_demo), it was used in a number of places in the core code and is now gone so can safely be removed from this as well I would expect.

1 Jun 2021, 1:15 PM
#2023
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: SitemapXML v.2

mc12345678:

Yeah, that's code that got removed from Zen Cart 1.5.7 (the function zen_admin_demo), it was used in a number of places in the core code and is now gone so can safely be removed from this as well I would expect.

Just to confirm, I had the same issue in YOUR_Admin/sitemapxml.php. The problem appears to arise when using the tickboxes under 'Select Sitemaps to Generate' .

I commented out the following like this:

/*case (zen_admin_demo()):      $action = '';      $messageStack->add_session(ERROR_ADMIN_DEMO, 'caution');      zen_redirect(zen_href_link(FILENAME_SITEMAPXML));      break;*/

Then it worked in 1.5.7c

22 Jun 2021, 5:12 PM
#2024
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: SitemapXML v.2

Sitemap XML v3.9.6, running on zc155e, PHP 7.3 and MySQL 5.5.5-10.4.10-MariaDB (ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION).

When products_reviews are part of the generated sitemap, I'm receiving a log similar to

[22-Jun-2021 18:52:36 Europe/Berlin] Request URI: /mysite/index.php?main_page=sitemapxml, IP address: ::1
#1  trigger_error() called at [C:\xampp\htdocs\mysite\includes\classes\db\mysql\query_factory.php:171]
#2  queryFactory->show_error() called at [C:\xampp\htdocs\mysite\includes\classes\db\mysql\query_factory.php:143]
#3  queryFactory->set_error() called at [C:\xampp\htdocs\mysite\includes\classes\db\mysql\query_factory.php:270]
#4  queryFactory->Execute() called at [C:\xampp\htdocs\mysite\includes\modules\pages\sitemapxml\sitemapxml_products_reviews.php:30]
#5  include(C:\xampp\htdocs\mysite\includes\modules\pages\sitemapxml\sitemapxml_products_reviews.php) called at [C:\xampp\htdocs\mysite\includes\templates\template_default\sitemapxml\tpl_main_page.php:21]
#6  require(C:\xampp\htdocs\mysite\includes\templates\template_default\sitemapxml\tpl_main_page.php) called at [C:\xampp\htdocs\mysite\index.php:97]
--> PHP Fatal error: 1055:'mydatabase.rd.languages_id' isn't in GROUP BY :: SELECT r.products_id, MAX(r.date_added) AS date_added, MAX(r.last_modified) AS last_modified, GREATEST(MAX(r.date_added), IFNULL(MAX(r.last_modified), '0001-01-01 00:00:00')) AS last_date, rd.languages_id
          FROM reviews r
            LEFT JOIN reviews_description rd ON (r.reviews_id = rd.reviews_id),
               products p
          WHERE p.products_id=r.products_id
            AND p.products_status=1
            AND r.status = 1
            AND rd.languages_id IN (1)
          GROUP BY r.products_id ORDER BY last_date DESC ==> (as called by) C:\xampp\htdocs\mysite\includes\modules\pages\sitemapxml\sitemapxml_products_reviews.php on line 30 <== in C:\xampp\htdocs\mysite\includes\classes\db\mysql\query_factory.php on line 171.

I corrected this by changing line 28 of /includes/modules/pages/sitemapxml/sitemapxml_products_reviews.php, adding the highlighted element:

  $sql = "SELECT r.products_id, MAX(r.date_added) AS date_added, MAX(r.last_modified) AS last_modified, GREATEST(MAX(r.date_added), IFNULL(MAX(r.last_modified), '0001-01-01 00:00:00')) AS last_date, rd.languages_id
          FROM " . TABLE_REVIEWS . " r
            LEFT JOIN " . TABLE_REVIEWS_DESCRIPTION . " rd ON (r.reviews_id = rd.reviews_id),
               " . TABLE_PRODUCTS . " p
          WHERE p.products_id=r.products_id
            AND p.products_status=1
            AND r.status = 1
            AND rd.languages_id IN (" . $sitemapXML->getLanguagesIDs() . ")
          GROUP BY r.products_id[B], rd.languages_id[/B]" .
          (SITEMAPXML_PRODUCTS_REVIEWS_ORDERBY != '' ? " ORDER BY " . SITEMAPXML_PRODUCTS_REVIEWS_ORDERBY : '');
5 Jul 2021, 10:21 PM
#2025
cunningstunt2 avatar

cunningstunt2

Zen Follower

Join Date:
Jan 2019
Location:
UK
Posts:
113
Plugin Contributions:
0

Re: SitemapXML v.2

Is this ok to use on 1.5.7c and php7.1? I don't have a test store to try it out on currently

17 Aug 2021, 9:55 PM
#2026
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
460
Plugin Contributions:
0

Re: SitemapXML v.2

*Sorry, I posted the below on the wrong thread :(
*Running fresh zen cart install 1.5.7c on PHP 7.3.2 with the latest sitemap plugin.
Ok, as for the (Select Sitemaps to Generate), I've left what is already ticked in sitemap, not sure if it's better to tick the boxnews, news, reviews?
I had to manually add a few of my categories as they did not get added to the file.

As for the main domain, do you have to use (.../index.php?main_page=index)? Can't just just use the actual domain without the index.php part?

Also, I first went to (https://www.xml-sitemaps.com) to create a sitemap and it scanned a whole lot more pages than the zen cart plugin did. Is it better to use that instead or stick with this?

Still not sure if the robots.txt I created is good to go or if it's need further adjusting?!
I just added mywebsite/sitemap.xml link to it, I did Not add the other .xml links like categories, products etc, as the readme text did not say to do that.
I went to google and submitted my sitemap.xml url but it says** couldn't fetch** and Sitemap could not be read.
Any reason why?

18 Aug 2021, 12:03 AM
#2027
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
460
Plugin Contributions:
0

Re: SitemapXML v.2

I've just set ALL the Permissions for the .xml files and .htaccess file that came with this plugin to 777, and they are being fetched now.
Is setting them all to 777 open to getting my site hacked or injected with any code etc..?
Do I leave them to 777 always?!

18 Aug 2021, 1:26 AM
#2028
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: SitemapXML v.2

Bugger, ended up with a duplicate message. See next post for content.

18 Aug 2021, 1:27 AM
#2029
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: SitemapXML v.2

rlexyd:

I've just set ALL the Permissions for the .xml files and .htaccess file that came with this plugin to 777, and they are being fetched now.
Is setting them all to 777 open to getting my site hacked or injected with any code etc..?
Do I leave them to 777 always?!
Every system is different. But, all files and folders on your server have one thing in common... they are all on your server for you to review, compare and make changes... so do you have all of your files and folders everywhere set to 777? Do you understand what those three numbers together mean? I'm not trying to play stump the chumpr or something... Some may say sure leave it that way if it works, others would say if you don't need to modify the files then should make them read, execute or the like only... as to whether they are writeable or not, well, sometimes security comes at a cost. Prevent changes until ready to make changes at which point make them writeable again...

Understand, on the server I use, last time I made a file 777, then I think I had to get the host to alter the permissions for me to regain access to the file. The host expects a max of 644 for files and 755 for folders... but that's one of the hosts with which I've worked. Another may require 777 for folders. I know that now or at least at one point the Zen Cart install instructions advocated 777 for folders while the development team probably will whack me across the head for saying this, but I haven't taken a hard look at those instructions for a while now... install, lock down specific folders and files, upgrade database and necessary files, move on. A lot of hard work has gone into those instructions.

18 Aug 2021, 9:44 PM
#2030
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
460
Plugin Contributions:
0

Re: SitemapXML v.2

mc12345678:

Every system is different. But, all files and folders on your server have one thing in common... they are all on your server for you to review, compare and make changes... so do you have all of your files and folders everywhere set to 777? Do you understand what those three numbers together mean? I'm not trying to play stump the chumpr or something... Some may say sure leave it that way if it works, others would say if you don't need to modify the files then should make them read, execute or the like only... as to whether they are writeable or not, well, sometimes security comes at a cost. Prevent changes until ready to make changes at which point make them writeable again...

Understand, on the server I use, last time I made a file 777, then I think I had to get the host to alter the permissions for me to regain access to the file. The host expects a max of 644 for files and 755 for folders... but that's one of the hosts with which I've worked. Another may require 777 for folders. I know that now or at least at one point the Zen Cart install instructions advocated 777 for folders while the development team probably will whack me across the head for saying this, but I haven't taken a hard look at those instructions for a while now... install, lock down specific folders and files, upgrade database and necessary files, move on. A lot of hard work has gone into those instructions.

Thank you as always mc.
Your reply went straight over my head though :)
But I assume since you did Not specifically warn me to change the 777 permissions back, I will just leave them that way for now.
*(if Google can't fetch these files at 644 permissions, than I have no choice.)
*
Might even look at using (https://www.xml-sitemaps.com) as it seemed to generate way more links and it's only one sitemap file. Not sure why this map generates several different sitemap files (might be a good thing but not sure), plus it keeps creating the manufacturessitemap even though the manufacturer box is unticked.)

18 Aug 2021, 10:33 PM
#2031
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: SitemapXML v.2

rlexyd:

Thank you as always mc.
Your reply went straight over my head though :)
But I assume since you did Not specifically warn me to change the 777 permissions back, I will just leave them that way for now.
*(if Google can't fetch these files at 644 permissions, than I have no choice.)
*
Might even look at using (https://www.xml-sitemaps.com) as it seemed to generate way more links and it's only one sitemap file. Not sure why this map generates several different sitemap files (might be a good thing but not sure), plus it keeps creating the manufacturessitemap even though the manufacturer box is unticked.)

  1. didn't say no don't do because I don't know your system. Not the first choice I would make. So for "ease". What are the folder permissions on the following folders: includes, images, zc_plugins, public?

  2. as for "number" of links, that is not necessarily the right thing. What product is missing from the sitemap xml files that are in your store?

  3. could have one file per product if so wanted, number of files doesn't mean anything. There is a set of "rules" to be followed to get from the root to the final location. Sitemap XML follows those. That the other file is created, if theres nothing in it, then shouldn't be a problem, though I'm sure it could be modified to eliminate generation of that (each?) file and associated data within the files.

After identifying the permissions of those folders, then can discuss further if an alternate setting should be set and/or attempted.

18 Aug 2021, 10:58 PM
#2032
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
460
Plugin Contributions:
0

Re: SitemapXML v.2

Thanks mc,

  1. Permissions are: (Host is Hostgator)
    includes: 755
    images: 755
    zc_plugins: 755
    public_html: 750

  2. There was a few categories not included in sitemap generation, had to manually add them to file (Cat where main and have products in them)

  3. I get you. Just a query, why must the main page url in sitemap have the /index.php?main_page=index part? Is this what I will show on google? I would rather just the domain, can I alter that part by removing the above bit from the domain url in sitemapmainpage.xml?

18 Aug 2021, 11:13 PM
#2033
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: SitemapXML v.2

rlexyd:

Thanks mc,

  1. Permissions are: (Host is Hostgator)
    includes: 755
    images: 755
    zc_plugins: 755
    public_html: 750

  2. There was a few categories not included in sitemap generation, had to manually add them to file (Cat where main and have products in them)

  3. I get you. Just a query, why must the main page url in sitemap have the /index.php?main_page=index part? Is this what I will show on google? I would rather just the domain, can I alter that part by removing the above bit from the domain url in sitemapmainpage.xml?

  1. so, the sitemap folder(s), things don't work if the folders are set to 755?

  2. these "categories" that didn't show, but have product, are the product linked from another category or is their master category this "missing" category?

  3. I don't claim to be an SEO expert, I do know that the main page is reachable by that address and that basically it is by server setup that the main page is reached without using all of the index references. Usually the link(s) used represent the canonical link (basically the one link that really represents the product/page even if there are multiple addresses that could be entered to get there. In this situation I would either do more research outside of this thread/forum, go with making the change, and/or go with the "majority" which has been to accept the index.php?main_page=index. I suspect it is listed that way solely from the "consistent" nature of generating an address using the zen_href_link code without possibly evaluating for use of just the domain name with any applicable subfolder.

18 Aug 2021, 11:42 PM
#2034
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
460
Plugin Contributions:
0

Re: SitemapXML v.2

Just changed them ALL to 755, but for some reason 2 out of the 4 .xml say (couldn't fetch) - (mainpage and products)
https://i.imgur.com/y78fKX8.png
I think they were top categories with either single or double digit products in them.

19 Aug 2021, 1:07 AM
#2035
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: SitemapXML v.2

rlexyd:

Just changed them ALL to 755, but for some reason 2 out of the 4 .xml say (couldn't fetch) - (mainpage and products)
https://i.imgur.com/y78fKX8.png
I think they were top categories with either single or double digit products in them.

When you say "ALL" can you clarify? The discusion of what folders to change was about a specific set based off of existing values...

So I was able to get to the four sitemap files. Note I also forgot to mention one reason to split things up even if just a little is that it makes loading a specific aspect faster.

Now as far as categories that may have been missing, I don't have the code open about how they are "discovered", but there is either some characteristic about the category that is not right or there could even be an issue with it though I'm banking more on the first aspect.
Realize that one of the powers of this software is for it to get the sitemap regenerated on a periodic basis. I understand that one or more "regeneration" features could be disabled, but if the file is modified manually, then on the next regen, that change will be yet again needed...

Thinking more on the issue of sitemapmainpage... (haven't done any further homework), the only "issue" I see is that 1) sitemap.xml is intended to tell spiders the "most direct" way to get to the item referenced, that it is by that information for the site to be linked. The expectation though at that point is that the spider (perhaps a different than the first) is to go to that page using the info provided and validate that it is identified to be what was "selected" and whatever review. But... and even though I followed that link, the canonical info said that it is just the domain name and sub-folder... so in a way saying: hey spider here are two pages to get to the same info, basically leaving it to the spider to figure out what to provide.

Now, that said, I'll note that your site is accessible by either using or not using the www. prefix... general statements have been that should pick one and force the site to load to that even on first load (not just to become that way on first click...

19 Aug 2021, 6:41 AM
#2036
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
460
Plugin Contributions:
0

Re: SitemapXML v.2

Thank you mc,
Sorry, I meant all the .xml files associated with the sitemap plugin and the .htaccess in the sitemap folder.
The categories are new and I have set them up just like the other categories, nothing weird or different.
I've decided to remove the index part from the sitemapmainpage.xml file.
As for forcing my site to force load the www.prefix, I tried adding different codes I got online into my .htaccess but none of them worked?!
The .htaccess in my public_html already has the following in it:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteEngine on


RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://.*amazonaws\.com [OR]
RewriteCond %{REMOTE_HOST} ^.*\.compute-1\.amazonaws\.com$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "AISearchBot" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "woriobot" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "heritrix" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "NetSeer" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "Nutch" [NC]
RewriteRule ^(.*)$ - [F] 
RewriteEngine on


# Use PHP5 Single php.ini as default
# Changed PHP handler from application/x-httpd-php5s to application/x-httpd-phpbetas on Thu Jan  7 15:29:29 MST 2016.
#AddHandler application/x-httpd-phpbetas .php


SetEnv TZ 'Australia/Sydney'


# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php74” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
19 Aug 2021, 7:03 AM
#2037
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
460
Plugin Contributions:
0

Re: SitemapXML v.2

Just figured out how to force redirect my domain to always add www to the url via my cPanel when someone just types the domain.com.au.
The only thing I don't know what to do is force the http to redirect to https.
My site always loads https, but I tested it with just http and it did not redirect?!

19 Aug 2021, 7:30 AM
#2038
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
460
Plugin Contributions:
0

Re: SitemapXML v.2

Just figured it out, I think as I'm not getting any issues loading site: (I edited the .htaccess my cPanel created inside my Domain folder instead of the other one in public_html)

RewriteEngine on
RewriteCond %{HTTP_HOST} ^DOMAIN.com.au$
RewriteRule ^/?$ "https://www.DOMAIN.com.au/" [R=301,L]

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

21 Aug 2021, 5:36 AM
#2039
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: SitemapXML v.2

rlexyd:

Thank you mc,
Sorry, I meant all the .xml files associated with the sitemap plugin and the .htaccess in the sitemap folder.
I previously had mentioned two different values when discussing files and folders. Files tend to be 644 and folders 755. I'm not sure what drove the discussion of folder permissions to then apply those same values to files especially after suggesting to identify likely values based off of comparison of similar objects.

I don't know how much of the above is still an issue. I was reading the recent history and realized that file permissions may be set wrong as they were being modified to the settings discussed for folders. For files, would suggest the same type of review though would sample files within folders. For example there is an htaccess file within at least the first level folder of the zen cart install. Then there are other files within most folders.

21 Aug 2021, 7:48 AM
#2040
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
460
Plugin Contributions:
0

Re: SitemapXML v.2

Sorry mc, misunderstood you.
I've changed the files back to 644 and made the folders 755 which matches other files/folders, will see how Google sees them and go from there.