-
SitemapXML v4 [Support thread]
uploading shortly a new update for Site Map XML to version 4 for ZC1.5.7 if accepted, should show up on it's own. If you are interested in helping out, got some ideas or just want something to play with, GitHub location.
I still have some things I want to play with, but for now as is it's working as before on ZC1.5.7 and PHP7.4 with allot easier install. A number of files was changed or deleted, thus I would not suggest this as a easy update, but a new install.
-
Re: SitemapXML v4 [Support thread]
Thanks for the effort, duly noted.
-
Re: SitemapXML v4 [Support thread]
If you use the EzPage template, it was pointed out that the language wasn't following along. Actually, it had some issues with tables and such so I cleaned it up and push to GitHub. I have no way to test it, so if you do, please let me know it it's working as you would expect it to.. Thanks..
-
Re: SitemapXML v4 [Support thread]
Thanks for the work on this plugin. I noticed a few things. First, \includes\templates\template_default\sitemapxml\html_header.php has a missing closing curly bracket. Second, the first parameter passed to the $snifer->field_exists and $sniffer->table_exists in \includes\modules\pages\sitemapxml\sitemapxml_ezpages.php should be without quotes. And third, TABLE_EZPAGES_TEXT is used but TABLE_EZPAGES_CONTENT should be used instead in \includes\modules\pages\sitemapxml\sitemapxml_ezpages.php. With these modifications I was able to generate the three xml files for categories, products and ezpages. Haven't tried the others.
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
vasilt
Thanks for the work on this plugin. I noticed a few things. First, \includes\templates\template_default\sitemapxml\html_header.php has a missing closing curly bracket. Second, the first parameter passed to the $snifer->field_exists and $sniffer->table_exists in \includes\modules\pages\sitemapxml\sitemapxml_ezpages.php should be without quotes. And third, TABLE_EZPAGES_TEXT is used but TABLE_EZPAGES_CONTENT should be used instead in \includes\modules\pages\sitemapxml\sitemapxml_ezpages.php. With these modifications I was able to generate the three xml files for categories, products and ezpages. Haven't tried the others.
Looks like header page got cut short... ezpage is in Github not the download yet as pointed out in the post.. still working on some things to add..
well push up the corrected header file too..
-
Re: SitemapXML v4 [Support thread]
pushed to Github fixes for bugs pointed out as well code changes.
- bug.. Undefined table sent to be sniffed out. plugins that may or may not exist for all users.
- Change in ezpage, no need to sniff out what exists in ZC1.5.7!
Still working on some ideas before sending in an update.
-
Re: SitemapXML v4 [Support thread]
Dave,
I was just experimenting with your plug-in (as pulled from github). It wouldn't install through Zen Cart until I changed:
$this->executeInstallerSql($sql);
to
$db->Execute($sql);
in ScriptedInstaller.php.
After that, it seemed to work.
One nitpick ... the "Create Sitemap's" button text should be "Create Sitemaps" in \admin\includes\languages\english\sitemapxml.php.
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
jadebox
Dave,
I was just experimenting with your plug-in (as pulled from github). It wouldn't install through Zen Cart until I changed:
$this->executeInstallerSql($sql);
to
$db->Execute($sql);
in ScriptedInstaller.php.
After that, it seemed to work.
One nitpick ... the "Create Sitemap's" button text should be "Create Sitemaps" in \admin\includes\languages\english\sitemapxml.php.
$this->executeInstallerSql($sql);
should work on ZC1.5.7 as is... I use $db->Execute($sql); for debugging but not having any issues with a vanilla install with the default $this->executeInstallerSql($sql); statement.. What's the environment?
Difference in spell check... but such is why language files are created for..
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
davewest
$this->executeInstallerSql($sql);
should work on ZC1.5.7 as is... I use $db->Execute($sql); for debugging but not having any issues with a vanilla install with the default $this->executeInstallerSql($sql); statement.. What's the environment?
Difference in spell check... but such is why language files are created for..
Dave, it's not a difference in spell check. The difference is between possessive (its) and contractions (it's = it is). In this case, it's the difference between plural (Sitemaps) and contractions (Sitemap's = Sitemap is).
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
lat9
Dave, it's not a difference in spell check. The difference is between possessive (its) and contractions (it's = it is). In this case, it's the difference between plural (Sitemaps) and contractions (Sitemap's = Sitemap is).
LOL.. After 70 some years you think I could figure it out... nop... 3's and E's still can't tell the difference.. I'm told quite often NOP is spelled wrong too...
pushed an update for the spelling...
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
davewest
$this->executeInstallerSql($sql);
should work on ZC1.5.7 as is... I use $db->Execute($sql); for debugging but not having any issues with a vanilla install with the default $this->executeInstallerSql($sql); statement.. What's the environment?
Sorry, I'm not sure what the difference is or was. Looking at the code, maybe the sql was bad and switching to $db->Execute masked it. But that wouldn't explain why the plug in works for me after that.
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
jadebox
Sorry, I'm not sure what the difference is or was. Looking at the code, maybe the sql was bad and switching to $db->Execute masked it. But that wouldn't explain why the plug in works for me after that.
Which is why more info would help tracking down the problem..
currently working in this environment:
[2020-05-18] XAMPP for Linux 7.4.6-0
This version of XAMPP contains the following software releases:
- Apache 2.4.43
- MariaDB 10.4.11
- OpenSSL 1.1.1g
- PEAR 1.7.1
- PHP 7.4.6
- phpMyAdmin 5.0.2
For me, $this->executeInstallerSql($sql) does not push a log file on errors... haven't spent time to find out why..
With $db->Execute($sql) does push log files..
I'm running in strict mode to make MariaDB supper picky on installs so I can find errors in my sql statements.
-
Re: SitemapXML v4 [Support thread]
Hi Dave - I hope this finds you well. I just upgraded to 1.5.7b and installed SiteMapXML 4.0 and the plugin manager shows it installed ok - the problem is it is not generating any sitemaps. I have ticked the ones I want generated and then saved settings then rebuild all sitemap xml files and I get a 500 error plus see myDEBUG below.
anything you can do to help would be great thanks mate.
cheers,
Mike
This is the myDEBUG error;
Code:
[20-Jan-2021 23:11:27 Australia/Sydney] PHP Parse error: syntax error, unexpected end of file in /home2/dazzler3/public_html/includes/templates/template_default/sitemapxml/html_header.php on line 40
[20-Jan-2021 23:11:27 Australia/Sydney] Request URI: /index.php?main_page=sitemapxml&rebuild=yes, IP address: 115.166.19.58
--> PHP Parse error: syntax error, unexpected end of file in /home2/dazzler3/public_html/includes/templates/template_default/sitemapxml/html_header.php on line 40.
this is the file in question - line 40 is blank at the very end of the file;
Code:
<?php
/**
* Common Template
*
* outputs the html header. i,e, everything that comes before the \</head\> tag <br />
*
* @copyright Copyright 2003-2020 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: Zen4All 2020 May 12 Modified in v1.5.7 $
*/
/* Mobile_Detect.php old school, responsive design doesn't need scripting */
// Prevent clickjacking risks by setting X-Frame-Options:SAMEORIGIN
header('X-Frame-Options:SAMEORIGIN');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
<head>
<title><?php echo HEADING_TITLE; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
<?php if (defined('FAVICON')) { ?>
<link rel="icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<?php } //endif FAVICON ?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />
<style>
body {
font-family: Verdana, Geneva, sans-serif;
font-size: small;
}
</style>
</head>
<?php
// BOF hreflang for multilingual sites
if (!isset($lng) || (isset($lng) && !is_object($lng))) {
$lng = new language;
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
shags38
Hi Dave - I hope this finds you well. I just upgraded to 1.5.7b and installed SiteMapXML 4.0 and the plugin manager shows it installed ok - the problem is it is not generating any sitemaps. I have ticked the ones I want generated and then saved settings then rebuild all sitemap xml files and I get a 500 error plus see myDEBUG below.
anything you can do to help would be great thanks mate.
cheers,
Mike
Looks like you are missing lines 40-46... going back through my files, for some reason those lines was left out during the compression.. strange . well have to re-compress and try again... Thanks for the report.. You can find the full code on GitHub too..
Code:
}
if (count($lng->catalog_languages) > 1) {
foreach($lng->catalog_languages as $key => $value) {
echo '<link rel="alternate" href="' . ($this_is_home_page ? zen_href_link(FILENAME_DEFAULT, 'language=' . $key, $request_type, false) : $canonicalLink . (strpos($canonicalLink, '?') ? '&' : '?') . 'language=' . $key) . '" hreflang="' . $key . '" />' . "\n";
}
}
// EOF hreflang for multilingual sites
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
davewest
Looks like you are missing lines 40-46... going back through my files, for some reason those lines was left out during the compression.. strange . well have to re-compress and try again... Thanks for the report.. You can find the full code on
GitHub too..
Code:
}
if (count($lng->catalog_languages) > 1) {
foreach($lng->catalog_languages as $key => $value) {
echo '<link rel="alternate" href="' . ($this_is_home_page ? zen_href_link(FILENAME_DEFAULT, 'language=' . $key, $request_type, false) : $canonicalLink . (strpos($canonicalLink, '?') ? '&' : '?') . 'language=' . $key) . '" hreflang="' . $key . '" />' . "\n";
}
}
// EOF hreflang for multilingual sites
G'day Dave - thanks for that. Only 1 sitemap is being generated and I get the following notice;
'Categories Sitemap
File https://www.dazzlerscliponearrings.c...categories.xml. Written 21 items (5129 bytes), Filesize: 5138 bytes
Total: files 1, items 21 (5138 bytes), execution time 0:0.0508, db queries 43, db queries time 0:0.0457.
Ezpages Sitemap
WARNING: An Error occurred, please refresh the page and try again.'
note that Ezpages Sitemap is mentioned but not generated - it is the next one in order selected in the options (something preventing the generation going past the first one?) - not even the main sitemap is generated - no myDEBUG error has been thrown.
cheers, Mike
-
Re: SitemapXML v4 [Support thread]
Not sure where I got off, but the zip I sent in still has old templates and holes in some of the files... Been updating allot of mads for PHP and such... Sent in a new zip after testing it to make sure it has complete files. Please download from GitHub and replace all your files. Shouldn't need to run the installer. All the templates that create the xml files are wrong in the zip I sent in. I just checked Github to make sure my local and remote are the same and they are.
Sorry about the mix-up..
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
davewest
Not sure where I got off, but the zip I sent in still has old templates and holes in some of the files... Been updating allot of mads for PHP and such... Sent in a new zip after testing it to make sure it has complete files. Please download from GitHub and replace all your files. Shouldn't need to run the installer. All the templates that create the xml files are wrong in the zip I sent in. I just checked Github to make sure my local and remote are the same and they are.
Sorry about the mix-up..
Thanks Dave .... works a treat .... your blood is worth bottling!!
be safe
cheers, Mike
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
shags38
Thanks Dave .... works a treat .... your blood is worth bottling!!
be safe
cheers, Mike
I may have spoken too soon Dave - sitemaps all generate but there is one issue which existed on previous versions. In electing yes to include images sitemap is pulling images from images/large/ which is adding the suffix .LRG to all image url's - I do not put my images in that /large/ folder - they are placed in a folder of another name, in this site's case the images are located in images/earrings/
Is there a file I can modify that will tell sitemap the correct folder to pull the images from?
cheers,
Mike
example url from products site map https://www.dazzlerscliponearrings.c...415521_LRG.jpg ... throws 404 error
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
shags38
I may have spoken too soon Dave - sitemaps all generate but there is one issue which existed on previous versions. In electing yes to include images sitemap is pulling images from images/large/ which is adding the suffix .LRG to all image url's - I do not put my images in that /large/ folder - they are placed in a folder of another name, in this site's case the images are located in images/earrings/
Is there a file I can modify that will tell sitemap the correct folder to pull the images from?
cheers,
Mike
example url from products site map
https://www.dazzlerscliponearrings.c...415521_LRG.jpg ... throws 404 error
It's a bit outside the suggested image setup, so would have to see how much work and what other effects it would have for others. I use the large, medium folders and suffix.. think image handler does something different.. Well see, have piles to burn yet before the snow comes.
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
davewest
It's a bit outside the suggested image setup, so would have to see how much work and what other effects it would have for others. I use the large, medium folders and suffix.. think image handler does something different.. Well see, have piles to burn yet before the snow comes.
FWIW, from the IH 5.1.9 readme:
If you are using IH5 on a site that also uses SitemapXML and have configured SitemapXML to Add Products Images, you'll need to edit one of the SitemapXML's files to allow those images to be properly reported. Editing /includes/modules/pages/sitemapxml/sitemapxml_products.php, you'll see this code-block towards the top of the file:
define('SITEMAPXML_PRODUCTS_IMAGES_SIZE', 'large');
define('SITEMAPXML_PRODUCTS_IMAGES_ADDITIONAL', 'false'); // true false
define('SITEMAPXML_PRODUCTS_IMAGES_FUNCTION', 'false'); // true false
… and you'll make the highlighted change to instruct SitemapXML to use the built-in Zen Cart function to create the images' links:
define('SITEMAPXML_PRODUCTS_IMAGES_SIZE', 'large');
define('SITEMAPXML_PRODUCTS_IMAGES_ADDITIONAL', 'false'); // true false
define('SITEMAPXML_PRODUCTS_IMAGES_FUNCTION', 'true'); // true false
I've not yet tried the SiteMapXML v4 to see if the same changes apply.
-
Re: SitemapXML v4 [Support thread]
Thanks Dave - in the interim I can copy images into that large folder, so an easy fix :smile:
cheers,
Mike
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
lat9
FWIW, from the IH 5.1.9 readme:
If you are using IH
5 on a site that also uses
SitemapXML and have configured
SitemapXML to
Add Products Images, you'll need to edit one of the
SitemapXML's files to allow those images to be properly reported. Editing /includes/modules/pages/sitemapxml/sitemapxml_products.php, you'll see this code-block towards the top of the file:
define('SITEMAPXML_PRODUCTS_IMAGES_SIZE', 'large');
define('SITEMAPXML_PRODUCTS_IMAGES_ADDITIONAL', 'false'); // true false
define('SITEMAPXML_PRODUCTS_IMAGES_FUNCTION', 'false'); // true false
… and you'll make the highlighted change to instruct
SitemapXML to use the built-in Zen Cart function to create the images' links:
define('SITEMAPXML_PRODUCTS_IMAGES_SIZE', 'large');
define('SITEMAPXML_PRODUCTS_IMAGES_ADDITIONAL', 'false'); // true false
define('SITEMAPXML_PRODUCTS_IMAGES_FUNCTION', '
true'); // true false
I've not yet tried the SiteMapXML v4 to see if the same changes apply.
Hello Cindy - many thanks for your response - that change worked a treat!! - image url's are now correct.
thanks again,
Mike
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
shags38
Hello Cindy - many thanks for your response - that change worked a treat!! - image url's are now correct.
thanks again,
Mike
Really no change in the code is needed. I do need to change the comment for better understanding. Changing from false to true makes no difference if IH is not installed. I'm wondering now why width and height is in the code when nether is used in the xml or ror feeds.
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
davewest
uploading shortly a new update for Site Map XML to version 4 for ZC1.5.7 if accepted, should show up on it's own. If you are interested in helping out, got some ideas or just want something to play with,
GitHub location.
I still have some things I want to play with, but for now as is it's working as before on ZC1.5.7 and PHP7.4 with allot easier install. A number of files was changed or deleted, thus I would not suggest this as a easy update, but a new install.
Hi Dave. Is version 4 only available on github? I'm only seeing v2.1 in the plugin section.
Best regards.
-
Re: SitemapXML v4 [Support thread]
I went ahead and downloaded from github for my zc157b. Worked like a treat! Thank you! :hug:
-
Re: SitemapXML v4 [Support thread]
The github link is giving a 404. Anyone have the current github link?
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
dbltoe
The github link is giving a 404. Anyone have the current github link?
I was gone some day, lost all internet code too.. lost left mind and writing my mind right works... I was working on ROR and maybe work both. I thought mod was v4 but I think it was by some was doing v2 too, not did.
I'll work next time..
-
Re: SitemapXML v4 [Support thread]
Until such time as DaveWest gets the github back together, I've created a repository at https://github.com/dbltoe/Sitemap-XML-4
It is merely a copy of what I captured off github before it went 404.
-
Re: SitemapXML v4 [Support thread]
this does not look promising. i hope @davewest is ok...
personally, i have always valued his contributions.
best.
IMC
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
dbltoe
Until such time as DaveWest gets the github back together, I've created a repository at
https://github.com/dbltoe/Sitemap-XML-4
It is merely a copy of what I captured off github before it went 404.
Just the heads up for anyone trying to install this mod, the entire admin folder is missing on this repository.
-
Re: SitemapXML v4 [Support thread]
:blush:
More than that actually.
The original included (and still does now) a totally empty sitemap.xml for the root. Dropping all files into github lost that file and a couple of folders when github balked at the empty file upload.
All are now in place.
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
dbltoe
:blush:
More than that actually.
The original included (and still does now) a totally empty sitemap.xml for the root. Dropping all files into github lost that file and a couple of folders when github balked at the empty file upload.
All are now in place.
Thank you, thank you, thank you!!! :hug:
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
dbltoe
:blush:
More than that actually.
The original included (and still does now) a totally empty sitemap.xml for the root. Dropping all files into github lost that file and a couple of folders when github balked at the empty file upload.
All are now in place.
I'm in the process of installing the mod, and noticed there's still nothing in the admin folder other than this file zen_cfg_read_only.php in admin/includes/functions/extra_functions. So of course the plugin won't install at all much less have a configuration page. So I'm wondering if an older version of this plugin would work on 1.5.7d.
-
Re: SitemapXML v4 [Support thread]
Again, I have verified that all the files are there and correct.
The important one is the install_instructions.txt.
One of the files establishes admin pages, etc through the DB
You should see the installation in YOUR_ADMMIN >> Modules >> Plugin Manager
IMHO, all the "missing items" theories are caused by this module being created while Plugin Manager was in it's infancy and not fully understood.
It APPEARS that Dave might have been unfamiliar with the establishment of files using the Manager so he just set some of them in place for the Manager to "use."
One thing to check: In doing it as it is, you may need to ensure that the files and folders involved all have the proper permissions allowing proper use and update. 755 for folders is standard and 644 for files. One installation set the sitemap directory to 775 versus 755.
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
dbltoe
Again, I have verified that all the files are there and correct
The important one is the install_instructions.txt.
One of the files establishes admin pages, etc through the DB
You should see the installation in YOUR_ADMMIN >> Modules >> Plugin Manager
IMHO, all the "missing items" theories are caused by this module being created while Plugin Manager was in it's infancy and not fully understood.
It APPEARS that Dave might have been unfamiliar with the establishment of files using the Manager so he just set some of them in place for the Manager to "use."
One thing to check: In doing it as it is, you may need to ensure that the files and folders involved all have the proper permissions allowing proper use and update. 755 for folders is standard and 644 for files. One installation set the sitemap directory to 775 versus 755.
So sorry! I completely missed it! Somehow in comparing both versions I thought there were missing files. My bad! :blush:
-
Re: SitemapXML v4 [Support thread]
It's been a year...
The mod is still not found in a Plug Ins Search, the original author passed on and davewest's status is unknown.
haredo and I have been able to get the last known files done by davewest to "work" with 158.
You can read what is going on at https://github.com/dbltoe/Sitemap-XML-4/issues/1
As neither of us are coders, any assistance, comments, and PRs are appreciated.
-
Re: SitemapXML v4 [Support thread]
The link is broken.
I'm using XML Sitemap Generator v4.1.3 and since today, also EZpages for posts which I migrated from my WordPress blog.
Unfortunately they are not being included in sitemap/sitemapezpages.xml
-
Re: SitemapXML v4 [Support thread]
Quote:
Originally Posted by
Shop Suey
The link is broken.
I'm using XML Sitemap Generator v4.1.3 and since today, also EZpages for posts which I migrated from my WordPress blog.
Unfortunately they are not being included in sitemap/sitemapezpages.xml
Hijacking this thread, to note that there's a more recent update posted on a different support-thread: https://www.zen-cart.com/downloads.php?do=file&id=367
-
Re: SitemapXML v4 [Support thread]
thanks!
Not for zen-cart-pro.at yet.
I will inform webchills via github
-
Re: SitemapXML v4 [Support thread]
The solution is to do 2 things:
- set value for order >0
- activate a location
I'm not using sideboxes and do not want to have EZ-Pages linked automatically so I chose "Sidebox" asl Location.
Now it works!