This doesnt appear to work for page_2
Printable View
Tried this and it didnt work. +1 post for me
How about being more descriptive of your attempted solution, the setup of your store, what didn't work, etc...
Here is the entry from a control panel on which the main_page=page_2 was rewritten. The store is located in a web-facing sub-directory called shop the HTTP_CATALOG and HTTPS_CATALOG allow for both to use the equivalent DIR_WS_CATALOG path information for http and https. Entry of the standard ZC path of http: // site /shop/index.php?main_page=page_2 where page_2 is not an ez-page (is instead defined in defined page editor of define_page_2.php) redirects to http: // site /shop/Monthly.
Code:
uri
language_id
current_uri
main_page
query_string_parameters
associated_db_id
alternate_uri
redirection_type_code
date_added
/shop/Monthly
1
1
page_2
NULL
NULL
NULL
301
2013-06-25 12:08:57
Here is a screenshot Attachment 16424
For the contact_us to be rewritten, remove main_page=
That field (column) represents the main_page= portion and only needs the value to the right of it up to the & of the next parameter if another parameter were to exist.
Also, if your database will support it, the associated_db_id field should be NULL instead of 0. Though 0 may still work. I forget how that portion of evaluation is written and prior to posting this haven't dug through the code. It is expected though that no such dB field would actually be 0 so I suspect that it will be a non-issue.
As I said earlier, "this didnt work for me"/ Maybe your advice will work.
I tried null for dbase number and it added 0.
Also, previous advice suggested using select NOW() for date. all that gives me is 00000000
That advice made no difference. Still get this http://mydomain.com/index.php?main_page=contact_us
The time issue certainly sounds like a mysql database setup issue (host related) or the absence of providing an appropriate date/time command/string (see the table configure settings below), but perhaps one or more of the following would provide a non-zero timestamp if used within a SQL statement:
CURDATE()
CURRENT_TIMESTAMP()
LOCALTIME()
LOCALTIMESTAMP()
SYSDATE()
UNIX_TIMESTAMP()
UTC_TIMESTAMP()
Though some of these only return dates not date and time.
Curious though, NOW() is typically used in ZC for changing settings such as configuration options. Does this mean that all of your configuration settings either show a date/time of when added or when modified as 0000-00-00 or not at all?
As to the null to 0, this appears to be related to the definition of the database table. The install sql declares the associated_db_id field as default null. Was there a problem with installation that required it to be modified? If not, then can you show an image of the area where you are entering your data to try to provide a rewritten uri.
Other question, in the attempts to obtain a functional version of the rewrite is there only one instance where the main_page of contact_us is listed and the active_uri is 1?
Here is the table creation sql for the ceon_uri_mappings table:
[code]CREATE TABLE
`" . TABLE_CEON_URI_MAPPINGS . "`
(
`uri` TEXT NOT NULL,
`language_id` INT(11) UNSIGNED DEFAULT NULL,
`current_uri` INT(1) UNSIGNED DEFAULT '0',
`main_page` VARCHAR(45) NULL,
`query_string_parameters` VARCHAR(255) DEFAULT NULL,
`associated_db_id` INT(11) UNSIGNED DEFAULT NULL,
`alternate_uri` VARCHAR(255) DEFAULT NULL,
`redirection_type_code` VARCHAR(3) DEFAULT '301',
`date_added` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
INDEX `assoc_db_id_idx` (`language_id`, `current_uri`, `main_page`, `associated_db_id`)
);[/url]
Lastly for now, what is your mysql database setup? Is this hosted possibly on a Windows system? Or with database setup preventing integers or unsigned integers from being null? The other fields seemed to get populated with NULL but somehow in the "making" the associated_db_id NULL (which really is or should be done by adding nothing into the field because afterall, NULL is (should be) the default meaning it's automatically that until something else is assigned.
So I scanned back thru the last few pages of this thread and could find no reference to the latest zen.
ZC155a was released May 5, 2016 and the last Ceon URI update was March 26. Since I'm about to install Ceon URI into zc155a, I compared the Ceon modified core files to the core files changed between 155 and 155a:
https://www.zen-cart.com/docs/change...5-5.html#v155a
From that list, only one file needs merging:
/admin/includes/functions/general.php
I'm going to merge the Ceon changes into the zc155a, then install.
Is anybody else running the latest Ceon URI on a 155a? Any known problems?