Zen Cart Logo
Forums / All Other Contributions/Addons / Ceon URI Mapping v4.x

Ceon URI Mapping v4.x

Views: 452,017

Results 1,801 to 1,820 of 2,454
3 Feb 2015, 9:58 PM
#1801
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Ceon URI Mapping v4.x

Ryk:

by circumventing the zen_record_admin_activity function
huh? Did you actually mean "circumvent" as in "break/bypass/disable" for even the built-in features? or did you mean "we won't use [the] function in all our modules' own customised add/remove/update/edit activities"?

I strongly advise that you LEAVE EXISTING calls to zen_record_admin_activity ALONE.

You don't need to add more, but removing or disabling built-in functionality, especially things that aid in security, is not particularly prudent.

I'm aware of the content of your discussion with wilt. But he certainly didn't tell you to go ahead and cripple or remove built-in functionality.

I realize that may make distributing 1 set of files for all 1.5.x versions a little more challenging, but the bridge contributed by lat9 would simplify that concern easily.

3 Feb 2015, 10:59 PM
#1802
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

I understand that the clarification was made for more than just JSWeb, but if I may interject. If the package is assembled for ZC 1.5.4 as it has for previous versions of ZC, and there are no additional calls to zen_record_admin_activity, then it would seem that the additional bridge would not be necessary. The files applicable to ZC 1.5.4 would already include the base ZC code for ZC 1.5.4 (maintaining existing zen_record_admin activity calls) with the modifications necessary for the plugin to operate under that environment and no backwards compatibility with zen_record_admin_activity would be necessary.

4 Feb 2015, 2:05 AM
#1803
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: Ceon URI Mapping v4.x

DrByte:

huh? Did you actually mean "circumvent" as in "break/bypass/disable" for even the built-in features? or did you mean "we won't use [the] function in all our modules' own customised add/remove/update/edit activities"?

I strongly advise that you LEAVE EXISTING calls to zen_record_admin_activity ALONE.

You don't need to add more, but removing or disabling built-in functionality, especially things that aid in security, is not particularly prudent.

I'm aware of the content of your discussion with wilt. But he certainly didn't tell you to go ahead and cripple or remove built-in functionality.

I realize that may make distributing 1 set of files for all 1.5.x versions a little more challenging, but the bridge contributed by lat9 would simplify that concern easily.

Dr Byte,

Nothing has been removed, or crippled in the updates to URI Mapping. You can take a deep breath and calm down :)
URI mapping is merged into version 1.5.4 files with all calls to zen_record_admin_activity intact.
zen_record_admin_activity was however added to the relevant product_book files to include them in the new activity reporting.

The bridge you mentioned has been included in the fileset that will be submitted, but purely as a safety net should issues have arisen without it.
However, it was not deemed necessary to have every single action of a URI module to write to the admin logs, and as you are aware, this was discussed with Wilt.

The URI module does not have a 'one set of files fits all' architecture. There are specific files, correctly merged for each version of ZC from 1.3.8a to 1.5.4

5 Feb 2015, 12:29 PM
#1804
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Ceon URI Mapping v4.x

My apologies for using the wrong phrase then. Not being a programmer myself, I was just putting it in what i thought was simple English. Thank you @**strelitzia** for the fuller explanation.

12 Feb 2015, 9:00 AM
#1807
panservolvo avatar

panservolvo

New Zenner

Join Date:
Sep 2010
Posts:
38
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

I have this module installed but there is a problem with images.
The problem happens in Internet Explorer 11, not in Chrome.
Absolutely all images on page disappears if the path contains two "folders" For example http://madasahatter.no/hatter works fine, but http://madasahatter.no/hatter/flosshatt don't.
I have <base href="http://madasahatter.no/" /> before any js or css in the header.
If I in Developer tools add a leading / to the src, the image pops up, but this shouldn't be necessary? The base ref has a / at the end, and src points directly to images/image.jpg

Another thing; I can’t add / to all images on page, it’s almost impossible to find all the images.
There has to be a bug somewhere since it only happens when there is two "folders" in the url?

Here's my .htaccess :

#
# @copyright Copyright 2003-2010 Zen Cart Development Team
# @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
# @version $Id: .htaccess 18695 2011-05-04 05:24:19Z drbyte $
#
# This is used with Apache WebServers
#
# The following blocks direct HTTP requests to all filetypes in this directory recursively, except certain approved exceptions
# It also prevents the ability of any scripts to run. No type of script, be it PHP, PERL or whatever, can normally be executed if ExecCGI is disabled.
# Will also prevent people from seeing what is in the dir. and any sub-directories
#
# For this to work, you must include either 'All' or at least: 'Limit' and 'Indexes' parameters to the AllowOverride configuration in your apache/conf/httpd.conf file.
# Additionally, if you want the added protection offered by the OPTIONS directive below, you'll need to add 'Options' to the AllowOverride list, if 'All' is not specified. 
# Example:
#<Directory "/usr/local/apache/htdocs">
#  AllowOverride Limit Options Indexes
#</Directory>
###############################

#ErrorDocument 404 /oppgradering.html

##ROOT##

ExpiresActive On
ExpiresByType text/css "access plus 500 days"
ExpiresByType application/javascript "access plus 500 days"

<Files stylesheet.css>
ExpiresByType text/css "access plus 350 days"
</Files>

 <FilesMatch \.(swf)$>
  ExpiresDefault "access plus 700 days"
 </FilesMatch>

 <FilesMatch \.(svg)$>
  ExpiresDefault "access plus 3000 days"
 </FilesMatch>

ExpiresByType image/gif "access plus 1500 days"

ExpiresByType image/jpg "access plus 1500 days"

ExpiresByType image/jpeg "access plus 1500 days"

ExpiresByType image/png "access plus 1500 days"

ExpiresByType image/bmp "access plus 1500 days"

# 48 weeks
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|JPG|woff)$">
Header set Cache-Control "max-age=29030400, public"
</FilesMatch>

<files *>
order allow,deny
deny from 80.212.29.94
deny from 74.50.57.39
deny from 24.189.60.120
deny from 84.17.15.2
deny from 211.167.110.2
deny from 91.201.64.26
deny from 65.208.189
deny from 65.211.195
#deny from 195.1.61
allow from all
</files>

RewriteEngine On

RewriteCond %{HTTP_HOST} !^madasahatter.no$ [NC]
RewriteRule ^(.*)$ http://madasahatter.no/$1 [L,R=301] 

#  RewriteBase /
#  add trailing slash if missing
#    rewriteRule ^(([a-z0-9\-]+/)*[a-z0-9\-]+)$ $1/ [NC,R=301,L]


# Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])
RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC]
# Don't rewrite any URIs for some, popular specific file format extensions,
#   which are not covered by main file extension condition above
RewriteCond %{REQUEST_URI} !\.(mp3|mp4|h264)$ [NC]
# Don't rewrite any URIs for some specific file format extensions,
#   which are not covered by main file extension condition above
#   Uncomment the following line to apply this condition! (Remove the # at the start of the next line)
#RewriteCond %{REQUEST_URI} !\.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]
# Don't rewrite admin directory
RewriteCond %{REQUEST_URI} !^/d49ogknott [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/editors/ [NC]
# Don't rewrite logs directory
RewriteCond %{REQUEST_URI} !^/logs/ [NC]
# Don't rewrite min directory
RewriteCond %{REQUEST_URI} !^/min/ [NC]
# Don't rewrite cgi-bin directory
RewriteCond %{REQUEST_URI} !^/cgi\-bin/ [NC]
# Don't rewrite .htpasswds directory
RewriteCond %{REQUEST_URI} !^/\.htpasswds/ [NC]
# Don't rewrite sitemap directory
RewriteCond %{REQUEST_URI} !^/sitemap/ [NC]
# Don't rewrite bmz_cache directory
RewriteCond %{REQUEST_URI} !^/bmz_cache/ [NC]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* index.php [QSA,L]
12 Feb 2015, 9:43 AM
#1808
panservolvo avatar

panservolvo

New Zenner

Join Date:
Sep 2010
Posts:
38
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Additional info: when i am in a "subfolder" the image path is as follows: http://madasahatter.no/hatter/images/image.jpg
The "hatter" folder get added for some reason to the base href

12 Feb 2015, 2:21 PM
#1809
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ceon URI Mapping v4.x

panservolvo:

Additional info: when i am in a "subfolder" the image path is as follows: http://madasahatter.no/hatter/images/image.jpg
The "hatter" folder get added for some reason to the base href

I'm guessing that the issue stems from an incorrect path in your configure.php files.. which is to say that I don't think the issue stems from this module, but is ILLUMINATED when you turn this module on..

12 Feb 2015, 3:48 PM
#1810
panservolvo avatar

panservolvo

New Zenner

Join Date:
Sep 2010
Posts:
38
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

DivaVocals:

I'm guessing that the issue stems from an incorrect path in your configure.php files.. which is to say that I don't think the issue stems from this module, but is ILLUMINATED when you turn this module on..

I don't think my config file is the problem?

// Define the webserver and path parameters
  // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
  // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
  define('HTTP_SERVER', 'http://madasahatter.no');
  define('HTTPS_SERVER', 'https://madasahatter.no');

  // Use secure webserver for checkout procedure?
  define('ENABLE_SSL', 'true');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');

  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
  define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
  define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
12 Feb 2015, 3:57 PM
#1811
panservolvo avatar

panservolvo

New Zenner

Join Date:
Sep 2010
Posts:
38
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Admin config file:

/**
 * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:
 * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries:
 */
  define('HTTP_SERVER', 'https://madasahatter.no');
  define('HTTPS_SERVER', 'https://madasahatter.no');
  define('HTTP_CATALOG_SERVER', 'http://madasahatter.no');
  define('HTTPS_CATALOG_SERVER', 'https://madasahatter.no');

  // secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).
  define('ENABLE_SSL_ADMIN', 'true');

  // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).
  define('ENABLE_SSL_CATALOG', 'true');

  define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTP_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTPS_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
  define('DIR_WS_HTTPS_CATALOG', '/');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
  define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
  define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

// * DIR_FS_* = Filesystem directories (local/physical)
  define('DIR_FS_ADMIN', preg_replace('#/includes/$#', '/', realpath(dirname(__FILE__) . '/../') . '/'));
  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_CATALOG', '/home/madasaha/public_html/');

  //the following path is a COMPLETE path to the /logs/ folder  eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
  define('DIR_FS_LOGS', '/home/madasaha/public_html/logs');

  define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
  define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
  define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
  define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
  define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
  define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
12 Feb 2015, 4:26 PM
#1812
signtorch avatar

signtorch

New Zenner

Join Date:
Dec 2014
Location:
SE TX
Posts:
32
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

looking at it in webmaster tools in msie and chrome, there is something wrong, causing almost all <head> content to appear in the <body> section, even though in view source it appears largely correct

so I'm guessing there's a syntax error or something causing that, and that the <base> tag being in the <body> might explain why msie doesn't seem to be using the designated <base> path with the relative image urls

EDIT - the <!doctype> isn't on the first line either - not sure if that matters

12 Feb 2015, 4:36 PM
#1813
signtorch avatar

signtorch

New Zenner

Join Date:
Dec 2014
Location:
SE TX
Posts:
32
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

well <!doctype doesn't have to be on the first line

but I see something else in the javascript, single quotes are escaped inside double-quoted strings

onmouseover="showtrail('bmz_cache...

12 Feb 2015, 4:46 PM
#1814
panservolvo avatar

panservolvo

New Zenner

Join Date:
Sep 2010
Posts:
38
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

SignTorch:

well <!doctype doesn't have to be on the first line

but I see something else in the javascript, single quotes are escaped inside double-quoted strings

onmouseover="showtrail('bmz_cache...

Where do you see this?
Good point on the header/body part also. I'll look into that later today

12 Feb 2015, 5:05 PM
#1815
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

SignTorch:

looking at it in webmaster tools in msie and chrome, there is something wrong, causing almost all <head> content to appear in the <body> section, even though in view source it appears largely correct

so I'm guessing there's a syntax error or something causing that, and that the <base> tag being in the <body> might explain why msie doesn't seem to be using the designated <base> path with the relative image urls

EDIT - the <!doctype> isn't on the first line either - not sure if that matters
Most likely there is an issue with "/includes/templates/zenn/common/html_header.php". Possibly the upload was corrupted... But a more likely cause is: the file was opened with a text editor, edited, and not saved using UTF-8 without BOM (the without BOM is very important). If this issue is present in the theme files, one will want to review the character encoding used in all of the theme files ("/includes/templates/zenn/"), in the define pages ("/includes/languages/<your_languages>/html_includes/"), and any core Zen Cart files which have been modified.

One will need to use a text editor supporting UTF-8 without BOM (such as NotePad++ or one bundled with an IDE) to edit and save files with the correct character encoding.

This does not look like an issue with CEON URI Mapping. I did notice the theme is a commercial theme purchased from themeforest... If the OP needs additional help fixing the theme, I would recommend they contact the author of the theme for commercial support.

12 Feb 2015, 5:25 PM
#1816
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ceon URI Mapping v4.x

lhungil:

Most likely there is an issue with "/includes/templates/zenn/common/html_header.php". Possibly the upload was corrupted... But a more likely cause is: the file was opened with a text editor, edited, and not saved using UTF-8 without BOM (the without BOM is very important). If this issue is present in the theme files, one will want to review the character encoding used in all of the theme files ("/includes/templates/zenn/"), in the define pages ("/includes/languages/<your_languages>/html_includes/"), and any core Zen Cart files which have been modified.

One will need to use a text editor supporting UTF-8 without BOM (such as NotePad++ or one bundled with an IDE) to edit and save files with the correct character encoding.

This does not look like an issue with CEON URI Mapping. I did notice the theme is a commercial theme purchased from themeforest... If the OP needs additional help fixing the theme, I would recommend they contact the author of the theme for commercial support.

and yet another reason why I DESPISE nearly anything coming from Theme Forest.. but this does go back to my original post.. the issue the OP has is not caused by this module, but it is certainly ILLUMINATED when this module is activated..

12 Feb 2015, 9:03 PM
#1817
panservolvo avatar

panservolvo

New Zenner

Join Date:
Sep 2010
Posts:
38
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

There must have been a file/several files with encoding errors or something like that. After I copied in a backup from last year the error is gone :D
Thanks for helping out guys!

12 Feb 2015, 9:45 PM
#1818
panservolvo avatar

panservolvo

New Zenner

Join Date:
Sep 2010
Posts:
38
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Bonus information; the error was caused by the CEON back in stock notification module. I changed all the file encodings to utf-8 without dom and it fixed the problem

12 Feb 2015, 10:43 PM
#1819
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ceon URI Mapping v4.x

panservolvo:

Bonus information; the error was caused by the CEON back in stock notification module. I changed all the file encodings to utf-8 without dom and it fixed the problem

Which was likely caused by either a bad download or a contributor AFTER Conor who may have introduced the issue.. (otherwise many may more folks would have the same issue)

20 Feb 2015, 9:09 AM
#1820
mattbough avatar

mattbough

New Zenner

Join Date:
Feb 2015
Location:
UK
Posts:
13
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Trying to use this and keep getting a 404 error, any idea on how I can sort this using the latest zen cart and I have put the rewrite rule in.