Hello, another one short notice...
As in "box_news" table all datetime columns (not only 'news_modified_date') can be NULL, it would be wise to use IFNULL function also for checking 'news_published_date' column in sql-queries in includes\modules\pages\sitemapxml\sitemapxml_boxnews.php file:
This will help to avoid PHP-warnings by passing NULL as parameterCode:echo '<h3>' . TEXT_HEAD_BOXNEWS . '</h3>'; $last_date = $db->Execute( "SELECT MAX(GREATEST(n.news_added_date, IFNULL(n.news_modified_date, '0001-01-01 00:00:00'), IFNULL(n.news_published_date, '0001-01-01 00:00:00'))) AS last_date FROM " . TABLE_BOX_NEWS . " n WHERE n.news_status = 1 AND NOW() BETWEEN n.news_start_date AND n.news_end_date" ); $table_status = $db->Execute("SHOW TABLE STATUS LIKE '" . TABLE_BOX_NEWS . "'"); $last_date = max($table_status->fields['Update_time'], $last_date->fields['last_date']); if ($sitemapXML->SitemapOpen('boxnews', $last_date)) { $news = $db->Execute( "SELECT n.box_news_id, GREATEST(n.news_added_date, IFNULL(n.news_modified_date, '0001-01-01 00:00:00'), IFNULL(n.news_published_date, '0001-01-01 00:00:00')) AS last_date, nc.languages_id AS language_id FROM " . TABLE_BOX_NEWS . " n INNER JOIN " . TABLE_BOX_NEWS_CONTENT . " nc ON n.box_news_id = nc.box_news_id AND nc.languages_id IN (" . $sitemapXML->getLanguagesIDs() . ") AND nc.news_title != '' WHERE n.news_status = 1 AND NOW() BETWEEN n.news_start_date AND n.news_end_date" . (SITEMAPXML_BOXNEWS_ORDERBY !== '' ? ' ORDER BY ' . SITEMAPXML_BOXNEWS_ORDERBY : '') ); $sitemapXML->SitemapSetMaxItems($news->RecordCount()); foreach ($news as $next_item) { $sitemapXML->writeItem(FILENAME_MORE_NEWS, 'news_id=' . $next_item['box_news_id'], $next_item['language_id'], $next_item['last_date'], SITEMAPXML_BOXNEWS_CHANGEFREQ); } $sitemapXML->SitemapClose(); unset($news); }
As "box_news" table is an 'external' table for this addon (created in another module), no additional verification can be excessive, I think
Last edited by yesaul; 5 Mar 2025 at 03:58 PM.
I have even more...Yet another GitHub issue opened
As $from and $where variables can be not empty in 'includes/modules/pages/sitemapxml/sitemapxml_ezpages.php' file after fixing the bug with using of quotes for TABLE_EZPAGES_TEXT constant (see earlier correspondence in this tread), "p." prefix must be added to all columns belonging to TABLE_EZPAGES table in all sql-queries, for ex:
Code:$page_query_sql = "SELECT p.toc_chapter FROM " . TABLE_EZPAGES . " p " . $from . " WHERE p.alt_url_external = '' AND ( (p.status_header = 1 AND p.header_sort_order > 0) OR (p.status_sidebox = 1 AND p.sidebox_sort_order > 0) OR (p.status_footer = 1 AND p.footer_sort_order > 0) ) AND p.status_toc != 0" . $where . " GROUP BY p.toc_chapter";
Last edited by yesaul; 6 Mar 2025 at 02:25 PM.
I'm using Firefox at the moment and a new sitemap can't be created.
The popup is being openend and the Url within looks ok but the content of the popup is just blank page and the sitemap is not being re-generated.
Unfortunately I can't use chromium at the moment to have the job done.
Is this a known issue?
My business is GDPR compliant Webhosting and other Web Services.
Beside that I still have a Zen Cart Shop running for Classic Vespa Spare Parts
Locations in Germany, Spain and Finland. Other worldwide locations on demand
A log file should be generated as it sounds like a partial blank page.
https://docs.zen-cart.com/user/troub...ng/blank_page/
Are You Vulnerable for an Accessibility Lawsuit?
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.
You're right. There's one:
Code:PHP Fatal error: Uncaught Error: Undefined constant "NAVBAR_TITLE" in /includes/modules/pages/sitemapxml/header_php.php:28 Stack trace: #0 /index.php(36): require() #1 {main} thrown in /includes/modules/pages/sitemapxml/header_php.php on line 28
My business is GDPR compliant Webhosting and other Web Services.
Beside that I still have a Zen Cart Shop running for Classic Vespa Spare Parts
Locations in Germany, Spain and Finland. Other worldwide locations on demand
I now understand this is not a known issue.
I'm using the PHP 8.3 compatible European branch for German language version (1.5.7h)
I wrote a bug report at github
My business is GDPR compliant Webhosting and other Web Services.
Beside that I still have a Zen Cart Shop running for Classic Vespa Spare Parts
Locations in Germany, Spain and Finland. Other worldwide locations on demand
Bookmarks