Any idea why the ezpages xml file includes links only for the default language? Categories and Products xml files are OK, include links for all languages.
Printable View
Any idea why the ezpages xml file includes links only for the default language? Categories and Products xml files are OK, include links for all languages.
Good catch... don't use it myself, but it looks like it needs updating. Still based on ZC1.3.9 code for ezpages... has a typo think TABLE_EZPAGES_TEXT can't find that table anywhere... plus the old code has a sniffer that's not working with php7.4 Well have to look more at mine..
Just remove the quotes of TABLE_EZPAGES_TEXT on line 25 of \includes\modules\pages\sitemapxml\sitemapxml_ezpages.php -change toCode:if ($sitemapXML->dbTableExist('TABLE_EZPAGES_TEXT')) {
Code:if ($sitemapXML->dbTableExist(TABLE_EZPAGES_TEXT)) {
It's a bit more complicated.. TABLE_EZPAGES_TEXT is not defined anywhere and still would fail. If you are using PHP lower then 7.3, you would not get a warning for the undefined.. replacing it with 'TABLE_EZPAGES_CONTENT' would get you closer to the fix, but there are also errors in the sql. I pushed the updated template for v4 up to Github but don't have a multilingual site to test it on. It does create the expected links. What version of ZC and PHP was the error on?
I use ZC 1.5.7 and PHP 7.4. And I found the definition of TABLE_EZPAGES_TEXT in \includes\extra_datafiles\ezpages_multilanguage_database_names.php which is the same as TABLE_EZPAGES_CONTENT. Removing the quotes actually did solve the problem because now the ezpages xml file includes links for all languages and throws no errors in the log files. The code is probably outdated but still this quick-fix will get us going until a new version comes out. Can you provide link to the new version in Github?
That file should have been deleted when you upgraded to Zen Cart v1.5.6 where multi-lingual ez-pages was built-in, thus making that old plugin pointless and actually incompatible. You should go delete all the other leftovers of that plugin that aren't part of original Zen Cart code.
I just installed the github release and im getting the following error on 1.57b can anyone help me work out whats wrong please???
[04-Dec-2020 23:04:19 UTC] PHP Parse error: syntax error, unexpected end of file in /includes/templates/template_default/sitemapxml/html_header.php on line 40
[04-Dec-2020 23:04:19 UTC] Request URI: /index.php?main_page=sitemapxml&rebuild=yes, IP address: 92.236.55.221
--> PHP Parse error: syntax error, unexpected end of file in /includes/templates/template_default/sitemapxml/html_header.php on line 40.
a few google searches give me various answers but im having no joy here adding symbols ect.
heres the offending code file thats throwing the error
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;
//> </form> </body> </html> }
its complaining about a missing curly bracket. at the end of your code:
no guarantees that it does what it is supposed to do though...PHP Code:
// BOF hreflang for multilingual sites
if (!isset($lng) || (isset($lng) && !is_object($lng))) {
$lng = new language;
}
//> </form> </body> </html> }
best.
it took me a long time to spot the difference there lol thanks bud ill enter it now and report my findings back even if its a success :)