Zen Cart Logo

SitemapXML v.2

Views: 613,216

Results 2,041 to 2,060 of 2,226
31 Aug 2021, 10:42 AM
#2041
rlexyd avatar

rlexyd

Zen Follower

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

SitemapXML v.2

Still having problems, Google now seems to only fetch 1 of the sitemaps?!
Also, Google has crawled my sire but only main page and another, no other pages show up. Very weird.
I have Google AdWords which used to help index my site quickly but something not right this time round.

2 Sep 2021, 10:44 PM
#2042
rlexyd avatar

rlexyd

Zen Follower

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

Re: SitemapXML v.2

Had to change all the permissions for the generated .xml and .htaccess files associated with the Sitemap plugin to 755 as that seems to be the only way Google can fetch them all?!

3 Sep 2021, 12:58 AM
#2043
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: SitemapXML v.2

rlexyd:

Had to change all the permissions for the generated .xml and .htaccess files associated with the Sitemap plugin to 755 as that seems to be the only way Google can fetch them all?!

understanding linux permissions/security can be a bit of work. but it is wrong to say that this is the only way to do something.

why the permissions on your .htaccess file need to be changed, well that's probably not true. if you can go to:

https://www.yoursite.com/.htaccess

and you see your .htaccess file on your browser window, i would suggest to you that is a problem; and not how one would want their webserver configured.

and your sitemap program is NOT generating your .htaccess. if it is, there is something wrong with this picture.

if you can go to:

https://www.mysite.com/sitemapcategories.xml (or whatever your sitemap is called)

and you can see that xml file in your browser window, then so can google.

having to manually change your sitemap permissions every time you regenerate your sitemap is far from ideal, and something that i would bring up with your hosting company.

understanding the owner of the file, the group of the file, and which user is running apache (or whatever is serving up your web pages), is a starting point for being able to add a crontab entry for your sitemap, generating new sitemaps on a scheduled basis (based on how often your product mix changes/goes out of stock, etc.), and having those sitemaps be available to whatever spider wants to look at them, without the need to change permissions every time the crontab runs.

why they would need to be more than 644 is more about the setup than anything else.

3 Sep 2021, 8:09 AM
#2044
rlexyd avatar

rlexyd

Zen Follower

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

Re: SitemapXML v.2

Thanks for your assistance.
The sitemapxml plugin has a .htaccess file included in a folder called sitemap where the generated sitemap files are.
https://www.mysite.com.au/sitemap/.htaccess
However, when you go the the url to access the .htaccess file it doesn't load, it shows a permission error.
(It appears you don't have permission to access this page. 403 Error. Forbidden.)
Only the sitemap files load via the url, which as you advise, Google should be able to see them if I can see them, but for some reason, when I add the sitemap link to google search console and it accepts, but when I check it a day or so later, it shows some of the sitemaps as (couldn't fetch) which is so weird, and for some reason google/bing are only showing 2/3 pages as indexed.
I thought especially with AdWords it would start showing a few more pages..

3 Sep 2021, 2:26 PM
#2045
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: SitemapXML v.2

rlexyd:

Thanks for your assistance.
The sitemapxml plugin has a .htaccess file included in a folder called sitemap where the generated sitemap files are.
https://www.mysite.com.au/sitemap/.htaccess
However, when you go the the url to access the .htaccess file it doesn't load, it shows a permission error.
(It appears you don't have permission to access this page. 403 Error. Forbidden.)
Only the sitemap files load via the url, which as you advise, Google should be able to see them if I can see them, but for some reason, when I add the sitemap link to google search console and it accepts, but when I check it a day or so later, it shows some of the sitemaps as (couldn't fetch) which is so weird, and for some reason google/bing are only showing 2/3 pages as indexed.
I thought especially with AdWords it would start showing a few more pages..

you bring up numerous issues. and you tend to post things that others may read as being true which are not.

  • 755 is not what i would recommend for your xml files.
  • a htaccess file is not generated by this sitemap plugin. there looks to be a .htaccess file included and the author wants it placed in the directory where your sitemap files are. but very different from it being generated by a script. cpanel could generate one, but not this plugin.
  • if the only files in your directory are xml files that you want to be seen by anyone browsing your site, the .htaccess file is not needed.
  • i would suggest reading up on it: https://ithemes.com/what-is-the-htaccess-file/
  • if you can see the sitemap xml files in your browser, so can google or any other search engine.
  • why a page gets indexed (or not) is a separate issue and part of the black arts of SEO.
  • what adwords has to be with anything, you got me. but marketing and SEO are not my thing. ensuring that your sitemap is in the correct format and readable is a different thing.
  • if all of your sitemap files are correct, then the problem would be somewhere else.
  • in general, i would guess that there is a problem with your sitemap files. and i would look at the ones that are not being indexed to ensure they look correct or at least like the other ones that are indexed.
  • if they are correct and google does not index them, i would investigate with google. especially since you are paying them for adwords.

hope that helps.

9 Sep 2021, 11:28 PM
#2046
rlexyd avatar

rlexyd

Zen Follower

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

Re: SitemapXML v.2

carlwhat:

you bring up numerous issues. and you tend to post things that others may read as being true which are not.

  • 755 is not what i would recommend for your xml files.
  • a htaccess file is not generated by this sitemap plugin. there looks to be a .htaccess file included and the author wants it placed in the directory where your sitemap files are. but very different from it being generated by a script. cpanel could generate one, but not this plugin.
  • if the only files in your directory are xml files that you want to be seen by anyone browsing your site, the .htaccess file is not needed.
  • if you can see the sitemap xml files in your browser, so can google or any other search engine.
  • why a page gets indexed (or not) is a separate issue and part of the black arts of SEO.
  • what adwords has to be with anything, you got me. but marketing and SEO are not my thing. ensuring that your sitemap is in the correct format and readable is a different thing.
  • if all of your sitemap files are correct, then the problem would be somewhere else.
  • in general, i would guess that there is a problem with your sitemap files. and i would look at the ones that are not being indexed to ensure they look correct or at least like the other ones that are indexed.
  • if they are correct and google does not index them, i would investigate with google. especially since you are paying them for adwords.

hope that helps.

Thanks for your reply :)
Yes, your are correct, the .htaccess file is included in this plugin and sits inside the sitemap folder that has the .xml files the plugin generates in admin.
As for the sitemap file, I ended up having to generate one from this link https://www.xml-sitemaps.com and use that instead and removed this plugin's generated .xml files.
So far Google has been able to fetch this new file correctly and not show any "couldn't fetch errors" as it did with the others.
(I've set the new sitemap.xml file to 644 permissions.)

10 Sep 2021, 12:26 AM
#2047
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: SitemapXML v.2

rlexyd:

Thanks for your reply :)
Yes, your are correct, the .htaccess file is included in this plugin and sits inside the sitemap folder that has the .xml files the plugin generates in admin.
As for the sitemap file, I ended up having to generate one from this link https://www.xml-sitemaps.com and use that instead and removed this plugin's generated .xml files.
So far Google has been able to fetch this new file correctly and not show any "couldn't fetch errors" as it did with the others.
(I've set the new sitemap.xml file to 644 permissions.)
Does your site have linked product? If so, does this "other tool" account for linked product? (basically does it only provide a single url for a product that has multiple urls available for it where they all have the same canonical url?

A program that does not account for linked product on a site that has linked product is not doing you any favors.

As to the indexing "issue(s)" to which you were referring, you need only provide the domain-name/subfolder-if-any/sitemap.xml file. That file is setup to support further reading and finding of information to occur. So not sure what was meant by only reading some of the files when there is only one file to be referenced.

Now, the content within each of those other generated files, sure that will be read/processed when/as necessary as determined by the search engine. Also, considering that those engines work more towards content than anything, if the same content is across multiple items, then the "variety" of the items is reduced and the number of indexed items may decrease over time. I too would not consider myself an SEO expert. I have seen on a rescue related site where each rescued animal has a different description but over time the number of indexed links has been seen to decrease. The point being that the search engine has its reasons and means to index and it may not match with the total number of items in the list that you see...

10 Sep 2021, 4:15 AM
#2048
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: SitemapXML v.2

.htacess files are not supposed to load in the browser by direct access. They control the behavior of requests for assets within the folder. So of course going to https://www.mysite.com.au/sitemap/.htaccess gets you a 403 error

# deny *everything*
<FilesMatch ".*">
  Order Allow,Deny
  Deny from all
</FilesMatch>

# but now allow just *certain* necessary files:
<FilesMatch ".*\.(xml|xml\.gz)$" >
  Order Allow,Deny
  Allow from all
</FilesMatch>

Those rules only allow .XML or .xml.gz files to be accessed with in that folder, that's it, its only purpose

26 Sep 2021, 7:04 AM
#2049
rlexyd avatar

rlexyd

Zen Follower

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

Re: SitemapXML v.2

Just tried to delete this plugin but ran into some issues.
I first went to Admin -> Tools -> Sitemap XML and click "Un-Install SitemapXML SQL" and ran the script..
A few statements popped up in green, screenshot attached (https://i.imgur.com/No88EL4.png).
Tried it a few times with the same thing happening, so I went to my server and deleted all the files that came in the plugin via FTP.
But now I can still see all the SitemapXML references in my Database.
Does this come with a un-install SQL I can manually install to remove all the config references from my database?

27 Sep 2021, 9:53 PM
#2050
rlexyd avatar

rlexyd

Zen Follower

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

Re: SitemapXML v.2

Has someone had any luck with the above request?
Thanking you in advance.

2 Oct 2021, 10:30 PM
#2051
rlexyd avatar

rlexyd

Zen Follower

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

Re: SitemapXML v.2

Just bumping this up, could really use the help here.

2 Oct 2021, 11:23 PM
#2052
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: SitemapXML v.2

rlexyd:

Just tried to delete this plugin but ran into some issues.
I first went to Admin -> Tools -> Sitemap XML and click "Un-Install SitemapXML SQL" and ran the script..
A few statements popped up in green, screenshot attached (https://i.imgur.com/No88EL4.png).
Tried it a few times with the same thing happening, so I went to my server and deleted all the files that came in the plugin via FTP.
But now I can still see all the SitemapXML references in my Database.
Does this come with a un-install SQL I can manually install to remove all the config references from my database?

i'm just not sure why it is important to you to delete these config values from the database.

if its really that important, backup your database, and understand sql is very powerful and you have the potential to screw things up royally, for very little gain, IMO.

that said, no warranty expressed or implied.

from phpMyadmin (or something similar) or from your tools -> install sql patch option:

// replace 'prefix.' with your database table prefix if you have one.  remove the period if you do not have one.

delete from  prefix.configuration
WHERE configuration_key LIKE '%SITEMAPXML%';

delete from  prefix.configuration_group
WHERE configuration_group_description LIKE '%SitemapXML%';

be berry berry careful.

best.

3 Oct 2021, 12:13 AM
#2053
rlexyd avatar

rlexyd

Zen Follower

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

Re: SitemapXML v.2

carlwhat:

i'm just not sure why it is important to you to delete these config values from the database.
if its really that important, backup your database, and understand sql is very powerful and you have the potential to screw things up royally, for very little gain, IMO.
that said, no warranty expressed or implied.

from phpMyadmin (or something similar) or from your tools -> install sql patch option:

// replace 'prefix.' with your database table prefix if you have one. remove the period if you do not have one.

delete from prefix.configuration
WHERE configuration_key LIKE '%SITEMAPXML%';

delete from prefix.configuration_group
WHERE configuration_group_description LIKE '%SitemapXML%';

> be berry berry careful.
> best.

**Great, thank you very much for that :)
**Also had to delete these...

DELETE FROM `zen_admin_pages` WHERE `zen_admin_pages`.`page_key` = 'sitemapxmlConfig';
DELETE FROM `zen_admin_pages` WHERE `zen_admin_pages`.`page_key` = 'sitemapxml';
8 Nov 2021, 12:48 PM
#2054
toyseller avatar

toyseller

Zen Follower

Join Date:
Jun 2008
Location:
UK
Posts:
209
Plugin Contributions:
0

Re: SitemapXML v.2

lat9:

Yes, the zen_admin_demo function was removed in zc157; commenting that line out is the thing to do.

Please could you clarify as Im not a coder.

I have just loaded sitemap onto a v157 site.

And am getting a ....

Call to undefined function zen_admin_demo() in zcadmin/sitemapxml.php line 35.

You say to comment it out ... so I commented out that 1 line - case (zen_admin_demo()): and the line below shows an error.

What lines do I comment out please ?

if (zen_not_null($action)) {

  switch ($action) {
    // demo active test
    case (zen_admin_demo()):
      $action = '';
      $messageStack->add_session(ERROR_ADMIN_DEMO, 'caution');
      zen_redirect(zen_href_link(FILENAME_SITEMAPXML));
      break;

    case 'upgrade':
    case 'install':
8 Nov 2021, 1:06 PM
#2055
toyseller avatar

toyseller

Zen Follower

Join Date:
Jun 2008
Location:
UK
Posts:
209
Plugin Contributions:
0

Re: SitemapXML v.2

woops. Have found the answer ... as there is another post

8 Nov 2021, 1:45 PM
#2056
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: SitemapXML v.2

toyseller:

woops. Have found the answer ... as there is another post
Glad you found it, it is always helpful to also include the link to where that particular post is. This way it helps you (in the future) and anyone else attempting to do the same... BTW, yes, probably too late to modify the above post, so help yourself/others as seen fit...

3 Jan 2022, 8:41 PM
#2057
lat9 avatar

lat9

Administrator

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

Re: SitemapXML v.2

Running Sitemap XML v3.9.6 on zc157c with strict MySQL. Running the admin tool to create the base sitemaps results in a MySQL fatal error:

[03-Jan-2022 21:23:52 Europe/Berlin] Request URI: /mysite/index.php?main_page=sitemapxml&rebuild=yes, IP address: 127.0.0.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:94]
--> PHP Fatal error: 1055:'canadianllama157.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,2)
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 was able to correct the issue via update to /includes/modules/pages/sitemapxml/sitemapxml_products_reviews.php, adding the highlighted change to the GROUP BY clause:

<?php
/**
 * Sitemap XML
 *
 * @package Sitemap XML
 * @copyright Copyright 2005-2015 Andrew Berezin eCommerce-Service.com
 * @copyright Copyright 2003-2015 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: sitemapxml_products_reviews.php, v 1.1 31.01.2015 15:29:52 AndrewBerezin $
 */

echo '<h3>' . TEXT_HEAD_PRODUCTS_REVIEWS . '</h3>';
$last_date = $db->Execute("SELECT MAX(GREATEST(r.date_added, IFNULL(r.last_modified, '0001-01-01 00:00:00'))) AS last_date
                           FROM " . TABLE_REVIEWS . " r
                           WHERE r.status = '1'");
$table_status = $db->Execute("SHOW TABLE STATUS LIKE '" . TABLE_REVIEWS . "'");
$last_date = max($table_status->fields['Update_time'], $last_date->fields['last_date']);
if ($sitemapXML->SitemapOpen('products_reviews', $last_date)) {
[B]//-bof-20220103-lat9-Correcting MySQL fatal error, missing rd.languages_id from GROUP BY[/B]
  $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 : '');
[B]//-eof-20220103-lat9[/B]
  $reviews = $db->Execute($sql);
/*
	if (zen_not_null($result['last_modified']) ){
		$lastmod = $reviews->fields['last_modified'];
	} else {
		$lastmod = $reviews->fields['date_added'];
	}
*/
  $sitemapXML->SitemapSetMaxItems($reviews->RecordCount());
  while (!$reviews->EOF) {
    $sitemapXML->writeItem(FILENAME_PRODUCT_REVIEWS, 'products_id=' . $reviews->fields['products_id'], $reviews->fields['languages_id'], $reviews->fields['last_date'], SITEMAPXML_PRODUCTS_REVIEWS_CHANGEFREQ);
    $reviews->MoveNext();
  }
  $sitemapXML->SitemapClose();
  unset($reviews);
}

// EOF
3 Feb 2022, 1:38 AM
#2060
wsworx avatar

wsworx

Zen Follower

Join Date:
Jun 2012
Location:
California
Posts:
260
Plugin Contributions:
0

Re: SitemapXML v.2

Can anyone tell me if this plugin will work in 1.5.7c?

Thank You