Post by bzark » Tue Oct 24, 2017 11:39 pm

I have been running OpenCart 2.1.0.2 for years and I am in the process of upgrading to version 2.3.0.2. I have successfully upgraded and I am slowly adding in all my extensions and theme. The only thing I have added back in so far is my custom theme. The issue I am seeing is that I have marketing pages on my site and they use dashes in the route

Code: Select all

index.php?route=xyz-123/test
and on the web server I have

Code: Select all

catalog/controller/xyz-123/test.php
. When I navigate to that link I get the 404 not found page. This worked find in 2.1.0.2.

Does anyone know if there was a change made so that dashes are not permitted in the URL's route?

New member

Posts

Joined
Wed Oct 01, 2014 10:32 pm

Post by bzark » Wed Oct 25, 2017 11:43 pm

Just in case anyone is interested in the fix for this. The following code (in a bunch of places) throws away the "dash". Just add the "-" to the regular expression and it will work.

Code: Select all

$route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route);
This isn't the complete solution but I don't have time at the moment to write it up. I am subscribed to the thread so if anyone in the future does need the complete fix, reply to this thread and I will be notified.

New member

Posts

Joined
Wed Oct 01, 2014 10:32 pm

Post by webcorvo » Wed Oct 25, 2017 11:54 pm

Hi,

Can you give us the url of your shop?

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal

Post by webcorvo » Thu Oct 26, 2017 12:00 am

on the config.php file you must have:

define('DIR_TEMPLATE', 'server_path/catalog/view/theme/');

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal

Post by bzark » Thu Oct 26, 2017 12:08 am

webcorvo wrote:
Thu Oct 26, 2017 12:00 am
on the config.php file you must have:

define('DIR_TEMPLATE', 'server_path/catalog/view/theme/');
That isn't the issue. I have that in my config.php file.

New member

Posts

Joined
Wed Oct 01, 2014 10:32 pm
Who is online

Users browsing this forum: No registered users and 161 guests