Quote Originally Posted by shags38 View Post
v1.5.7b CEON v5.1.0

I have this error being thrown every 4 minutes or so for hundreds of products so these are examples of a much repeated error log with the variations being the product uri and filename affected (as per the types in the .php) - I have checked the file /includes/extra_datafiles/ceon_uri_mapping_product_pages.php and it seems to be OK, matches my file copy of the v5.1.0 download but not sure if there have been any subsequent mods to the file since downloading (same file exists in the v5.0.0 version) - am stumped as to what the issue may be and would really appreciate some assistance.
cheers, Mike

Code:
[24-Mar-2024 13:14:42 Australia/Sydney] Request URI: /sterling-silver-clip-on-earrings/clip-on-earrings-unique-artisan-crafted-in-sterling-silver/review?reviews_id=19, IP address: 47.128.117.243
#1 include(/includes/extra_datafiles/ceon_uri_mapping_product_pages.php) called at [/includes/init_includes/init_file_db_names.php:80]
#2 require(/includes/init_includes/init_file_db_names.php) called at [/includes/application_top.php:185]
#3 require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: Use of undefined constant FILENAME_DOCUMENT_GENERAL_INFO - assumed 'FILENAME_DOCUMENT_GENERAL_INFO' (this will throw an Error in a future version of PHP) in /includes/extra_datafiles/ceon_uri_mapping_product_pages.php on line 24.

[24-Mar-2024 13:14:42 Australia/Sydney] Request URI: /sterling-silver-clip-on-earrings/clip-on-earrings-unique-artisan-crafted-in-sterling-silver/review?reviews_id=19, IP address: 47.128.117.243
#1 include(/includes/extra_datafiles/ceon_uri_mapping_product_pages.php) called at [/includes/init_includes/init_file_db_names.php:80]
#2 require(/includes/init_includes/init_file_db_names.php) called at [/includes/application_top.php:185]
#3 require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: Use of undefined constant FILENAME_DOCUMENT_PRODUCT_INFO - assumed 'FILENAME_DOCUMENT_PRODUCT_INFO' (this will throw an Error in a future version of PHP) in /includes/extra_datafiles/ceon_uri_mapping_product_pages.php on line 25.
copy of my installed /includes/extra_datafiles/ceon_uri_mapping_product_pages.php
Code:
<?php

/**
 * Ceon URI Mapping Product Page Definitions.
 *
 * Contains arrays with the list of the product pages and product related pages this store uses.
 *
 * @package     ceon_uri_mapping
 * @author      Conor Kerr <[email protected]>
 * @copyright   Copyright 2008-2019 Ceon
 * @copyright   Copyright 2003-2007 Zen Cart Development Team
 * @copyright   Portions Copyright 2003 osCommerce
 * @link        http://ceon.net/software/business/zen-cart/uri-mapping
 * @license     http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version     $Id: ceon_uri_mapping_product_pages.php 1027 2012-07-17 20:31:10Z conor $
 */

/**
 * If the store has any custom product page types, add their info page definitions to the list.
 */
if (empty($ceon_uri_mapping_product_pages)) $ceon_uri_mapping_product_pages = array();

$ceon_uri_mapping_product_pages = array_merge(array(
	FILENAME_DOCUMENT_GENERAL_INFO,
	FILENAME_DOCUMENT_PRODUCT_INFO,
	FILENAME_PRODUCT_INFO,
	FILENAME_PRODUCT_BOOK_INFO,
	FILENAME_PRODUCT_FREE_SHIPPING_INFO,
	FILENAME_PRODUCT_MUSIC_INFO
	), $ceon_uri_mapping_product_pages);

if (empty($ceon_uri_mapping_product_related_pages)) $ceon_uri_mapping_product_related_pages = array();
	
$ceon_uri_mapping_product_related_pages = array_merge(array(
	FILENAME_PRODUCT_REVIEWS,
	FILENAME_PRODUCT_REVIEWS_INFO,
	FILENAME_PRODUCT_REVIEWS_WRITE
	), $ceon_uri_mapping_product_related_pages);

if (defined('FILENAME_TELL_A_FRIEND')) {
	$ceon_uri_mapping_product_related_pages[] = FILENAME_TELL_A_FRIEND;
}
if (defined('FILENAME_ASK_A_QUESTION')) {
	$ceon_uri_mapping_product_related_pages[] = FILENAME_ASK_A_QUESTION;
}
Do you have the file includes/extra_datafiles/ceon_uri_mapping_database_tables.php in place? That file contains the definition that appears to be missing. It appears though that because the file handlers that process the associated directories don't use the glob function that perhaps sorting is not accomplished and therefore the file reporting the issue is loaded before the file desired to be loaded earlier.

Unfortunate, but that's the design chosen to perform the Laravel file loading. Looks like some additional unnecessary logic would need to be incorporated if you're answer to the above is that the file is present. If the file is not present, then wonder what other files are missing, which I would have thought would be identified in the installation check or whatever it is that reports extra files and potentially missing files.