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.
Printable View
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.
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;
this is the file in question - line 40 is blank at the very end of the file;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.
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;
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
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..
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.
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.