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

Ceon URI Mapping v4.x

Views: 451,973

Results 2,141 to 2,160 of 2,454
10 Jul 2017, 3:37 AM
#2141
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Ceon URI Mapping v4.x

Ok guys, I can't find the answer I'm looking for, though it's probably in these 200 some pages somewhere... How do I add define pages such as contact us, about us, login etc...? please and thank you, John

ZC1.5.5E + CEON 4.5.2

10 Jul 2017, 9:33 AM
#2142
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ceon URI Mapping v4.x

bumba000:

Ok guys, I can't find the answer I'm looking for, though it's probably in these 200 some pages somewhere... How do I add define pages such as contact us, about us, login etc...? please and thank you, John

ZC1.5.5E + CEON 4.5.2

Didn't take much backreading (3 pages back from here) to find an example of what was requested. The linked post shows the field data needed to be entered except the active status is incorrect for the particular situation. The active status of the example should be a 1 and further a destination should have only 1 active uri, all others should be 0.

https://www.zen-cart.com/showthread.php?184548-Ceon-URI-Mapping-v4-x&p=1330629#post1330629

10 Jul 2017, 3:25 PM
#2143
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

hey MC, while I do appreciate the response, that was unnecessarily condescending. I started from page one, skipped around a bit and also searched the thread for posts containing "define", "define page", "about us" and so on. How would I have known to go to the end of this thread and move back three pages? The only reason you knew that is because you were involved in the conversation three pages back.

Thanks, John

10 Jul 2017, 3:43 PM
#2144
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

The about-us entry is not working. When adding the record I get a warning that NULL is not an acceptable value for associated_db_id. The about-us page auto generated link remains as main_page=about_us. If I attempt to access the URL manually .com/about-us it changes to .com/NULL and returns page not found.

Attachment 17130

10 Jul 2017, 3:49 PM
#2145
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ceon URI Mapping v4.x

bumba000:

hey MC, while I do appreciate the response, that was unnecessarily condescending. I started from page one, skipped around a bit and also searched the thread for posts containing "define", "define page", "about us" and so on. How would I have known to go to the end of this thread and move back three pages? The only reason you knew that is because you were involved in the conversation three pages back.

Thanks, John
Unintentionally so.

For a thread that has existed a long time, it is generally suggested that in absence of reading the entire thread that at least one work backwards from the end a little possibly as much so to the point of the last update. There are those that will read the entire thing, but for the most part issues and things identified early on would be expected to have been resolved and such early beginnings would not likely be as fruitful.

This action and similar manual rewrites are also something described in the instructions, though a direct sql statement was not provided. This was something I had already indicated in a related discussion with you about the topic. It can be found in section 10 of the configuration tab of the instructions.

10 Jul 2017, 3:53 PM
#2146
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ceon URI Mapping v4.x

bumba000:

The about-us entry is not working. When adding the record I get a warning that NULL is not an acceptable value for associated_db_id. The about-us page auto generated link remains as main_page=about_us. If I attempt to access the URL manually .com/about-us it changes to .com/NULL and returns page not found.

Attachment 17130
It appears that the text NULL has been entered rather than using the checkbox to assign as NULL (if entering via phpMyAdmin) also see that one entry has NUL and is left justified like the other entry of NULL on that row. Looking at the row above, one can see that an entry of NULL has been made but is right justified.

10 Jul 2017, 5:01 PM
#2147
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

That was definitely the problem. I had typed NULL into the fields and had even misspelled one of them. It works now. Thank you very much!

10 Jul 2017, 5:07 PM
#2148
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ceon URI Mapping v4.x

bumba000:

That was definitely the problem. I had typed NULL into the fields and had even misspelled one of them. It works now. Thank you very much!

Welcome!

26 Sep 2017, 12:26 PM
#2149
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

ZC v1.5.5e
SBA
CEON 4.5.3
DPU
Dynamic Filter
Zen Magnific
User Tracking
One Page Checkout
CSS_JS Loader
Stirling Grand

I've been using CEON URI Mapping for years on a number of sites, but on one (recently upgraded to CEON v4.5.3 and ZC v1.5.5e) I've found the categories in the breadcrumb are not being rewritten. All other links on the site (inc. categories) are being rewritten just not these.

The includes > init_includes > overrides > init_add_crumbs.php is as in the mod package, not sure where else to look, any suggestions?

26 Sep 2017, 1:39 PM
#2150
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Adding the includes>functions>html_output.php modifications present in CEON v4.5.2 seemed to do the job.

This is a bit strange as edits to that file are not required in v4.5.3 - replaced by observers. All observer/class files are present and correct.

(using PHP 7)

28 Sep 2017, 1:06 PM
#2151
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Ceon URI Mapping v4.x

I can confirm that the friendly url is not being generated from the breadcrumbs when the notifier added in 1.55 is used
NOTIFY_SEFU_INTERCEPT
in function zen_href_link
instead of the hard-coded CEON code chunk originally included in the CEON URI mapping distribution for html_output.

So in the hope of interesting people who know what they are talking about, a bit of info on a plate.

The breadcrumb link is called from init_add_crumbs: eg:.

$breadcrumb->add(HEADER_TITLE_CATALOG, zen_href_link(FILENAME_DEFAULT));

So this goes off to html_output to make the link:

function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
    global $request_type, $session_started, $http_domain, $https_domain, $zco_notifier;
    $link = null;
    $zco_notifier->notify('NOTIFY_SEFU_INTERCEPT', array(), $link, $page, $parameters, $connection, $add_session_id, $static, $use_dir_ws_catalog);
    if($link !== null) return $link;

Normally $zco_notifier->notify('NOTIFY_SEFU_INTERCEPT'... would send this off to be modified by \includes\classes\observers\auto.ceon_uri_mapping_link_build.php

but the observer is not working for the breadcrumbs. It works for all other links.

I assume that this because init_add_crumbs is happening earlier in the page than this observer has been instantiated, but I am bit vague on how this works/how to prove it/fix it.

Here's the autoload debug from my dev shop, its seems CEON gets started before init_crumbs, so any advice would be appreciated...

actionPoint=>0 include('includes/version.php');
actionPoint=>0 include('(path...)/includes/classes/class.base.php');
actionPoint=>0 include('(path...)/includes/classes/class.notifier.php');
actionPoint=>0 $zco_notifier = new notifier();
actionPoint=>0 include('(path...)/includes/classes/class.phpmailer.php');
actionPoint=>0 include('(path...)/includes/classes/boxes.php');
actionPoint=>0 include('(path...)/includes/classes/category_tree.php');
actionPoint=>0 include('(path...)/includes/classes/template_func.php');
actionPoint=>0 include('(path...)/includes/classes/split_page_results.php');
actionPoint=>0 include('(path...)/includes/classes/language.php');
actionPoint=>0 include('(path...)/includes/classes/cache.php');
actionPoint=>0 include('(path...)/includes/classes/sniffer.php');
actionPoint=>0 include('(path...)/includes/classes/shopping_cart.php');
actionPoint=>0 include('(path...)/includes/classes/navigation_history.php');
actionPoint=>0 include('(path...)/includes/classes/currencies.php');
actionPoint=>0 include('(path...)/includes/classes/message_stack.php');
actionPoint=>0 include('(path...)/includes/classes/breadcrumb.php');
actionPoint=>0 include('(path...)/includes/classes/query_cache.php');
actionPoint=>0 $queryCache = new QueryCache();
actionPoint=>0 include('(path...)/includes/classes/class.zcPassword.php');
actionPoint=>0 $zcPassword = new zcPassword();
actionPoint=>0 include('(path...)/includes/classes/class.CeonURIMappingHandler.php');
actionPoint=>0 include('(path...)/includes/classes/observers/class.user_tracking.php');
actionPoint=>10 require('includes/init_includes/init_file_db_names.php');
actionPoint=>10 require('includes/init_includes/init_database.php');
actionPoint=>30 $zc_cache = new cache();
actionPoint=>40 require('includes/init_includes/init_db_config_read.php');
actionPoint=>41 require('includes/init_includes/init_notifier_trace.php');
actionPoint=>41 require('includes/init_includes/init_report_all_errors.php');
actionPoint=>50 $sniffer = new sniffer();
actionPoint=>50 require('includes/init_includes/overrides/init_gzip.php');
actionPoint=>50 require('includes/init_includes/init_sefu.php');
actionPoint=>60 require('includes/init_includes/init_general_funcs.php');
actionPoint=>60 require('includes/init_includes/init_tlds.php');
actionPoint=>70 require('includes/init_includes/init_sessions.php');
actionPoint=>71 require('includes/init_includes/init_notifier_trace.php');
actionPoint=>78 include('(path...)/includes/classes/observers/class.products_options_stock_observer.php');
actionPoint=>78 $posObserver = new products_options_stock_observer();
actionPoint=>80 actionPoint=>90 $currencies = new currencies();
actionPoint=>90 include('(path...)/includes/classes/observers/class.ec_analytics.php');
actionPoint=>90 $ec_analytics = new ec_analytics();
actionPoint=>90 include('(path...)/includes/classes/observers/class.perfmon.php');
actionPoint=>90 $perfmon = new perfmon();
actionPoint=>99 $ceon_uri_mapping = new CeonURIMappingHandler();
actionPoint=>100 $template = new template_func();
actionPoint=>100 require('includes/init_includes/init_sanitize.php');
actionPoint=>100 actionPoint=>110 require('includes/init_includes/init_languages.php');
actionPoint=>110 require('includes/init_includes/init_templates.php');
actionPoint=>115 require('includes/init_includes/init_zca_layout.php');
actionPoint=>120 $_SESSION[navigation]->add_current_page();
actionPoint=>120 require('includes/init_includes/overrides/init_currencies.php');
actionPoint=>130 $messageStack = new messageStack();
actionPoint=>130 require('includes/init_includes/overrides/init_customer_auth.php');
actionPoint=>139 require('includes/init_includes/init_posm_product_valid.php');
actionPoint=>140 require('includes/init_includes/init_cart_handler.php');
actionPoint=>150 require('includes/init_includes/init_special_funcs.php');
actionPoint=>160 $breadcrumb = new breadcrumb();
actionPoint=>160 require('includes/init_includes/init_category_path.php');
actionPoint=>161 require('includes/init_includes/overrides/init_canonical.php');
actionPoint=>170 require('includes/init_includes/overrides/init_add_crumbs.php');
actionPoint=>175 require('includes/init_includes/init_observers.php');
actionPoint=>180 require('includes/init_includes/overrides/init_header.php');
actionPoint=>190 include('(path...)/includes/classes/observers/class.products_viewed_counter.php');
actionPoint=>190 $products_viewed_counter = new products_viewed_counter();
actionPoint=>190 include('(path...)/includes/classes/observers/class.search_log.php');
actionPoint=>190 $search_log = new search_log();
actionPoint=>199 $user_tracking_observe = new user_tracking();
actionPoint=>200 include('(path...)/includes/classes/observers/class.advshipperCheckoutProcess.php');
actionPoint=>200 $advshipper_checkout_process = new advshipperCheckoutProcess();
actionPoint=>200 include('(path...)/includes/classes/observers/class.back_in_stock_notificationsAccount.php');
actionPoint=>200 $back_in_stock_notifications_account = new back_in_stock_notificationsAccount();
actionPoint=>200 include('(path...)/includes/classes/observers/class.back_in_stock_notificationsProductInfo.php');
actionPoint=>200 $back_in_stock_notifications_product_info = new back_in_stock_notificationsProductInfo();
actionPoint=>200 include('(path...)/includes/classes/dynamic_price_updater.php');
actionPoint=>200 include('(path...)/includes/classes/observers/class.emailFor404.php');
actionPoint=>200 $emailFor404 = new emailFor404();
actionPoint=>200 include('(path...)/includes/classes/observers/class.emp_order_observer.php');
actionPoint=>200 $emp_order_observer = new emp_order_observer();

28 Sep 2017, 1:23 PM
#2152
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ceon URI Mapping v4.x

I don't have a copy of the updated Ceon URI up/open to see how the observer is incorporated, but seeing that there is no specific call to the observer, then it loads at point 175 which is after the crumbs ran at 170. So to specifically support the rewrite of the breadcrumbs, the Ceon observer would need to load before the breadcrumb of 170. This would be accomplished by adding an includes/autoloader file to specifically load at least that one observer point prior to 170 (168?).

28 Sep 2017, 8:46 PM
#2153
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Ceon URI Mapping v4.x

Great. I swapped around the breakpoints in config.core (init_observers at 170 and init_add_crumbs at 175) and all appears to be working now.

Thanks for the quick response.

/** STEVE swapped 170 and 175 around to allow breadcrumbs to be handled by observer
   * Breakpoint 170.
   *
   * require('includes/init_includes/init_observers.php');
   *
   */
  $autoLoadConfig[170][] = array('autoType'=>'init_script',
                                 'loadFile'=> 'init_observers.php');
/**
 * Breakpoint 175.
 *
 * require('includes/init_includes/init_add_crumbs.php');
 *
 */
$autoLoadConfig[175][] = array('autoType'=>'init_script',
    'loadFile'=> 'init_add_crumbs.php');
29 Sep 2017, 6:02 AM
#2154
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ceon URI Mapping v4.x

torvista:

Great. I swapped around the breakpoints in config.core (init_observers at 170 and init_add_crumbs at 175) and all appears to be working now.

Thanks for the quick response.

/** STEVE swapped 170 and 175 around to allow breadcrumbs to be handled by observer

  • Breakpoint 170.
  • require('includes/init_includes/init_observers.php');

/
$autoLoadConfig[170][] = array('autoType'=>'init_script',
'loadFile'=> 'init_observers.php');
/
*

  • Breakpoint 175.
  • require('includes/init_includes/init_add_crumbs.php');

*/
$autoLoadConfig[175][] = array('autoType'=>'init_script',
'loadFile'=> 'init_add_crumbs.php');


That may have shown proof of concept, but is not an ideal solution to what could be corrected with a minor change of the plugin rather than ZC core code.

Please see <https://github.com/mc12345678/CEON-URI-Mapping/commit/1ef3c5963e394f793008bfa0f50c83abf882e64f>
29 Sep 2017, 7:37 AM
#2155
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

mc, thank you for that GitHub fork. All's working fine now.

29 Sep 2017, 10:36 AM
#2156
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ceon URI Mapping v4.x

simon1066:

mc, thank you for that GitHub fork. All's working fine now.
Welcome, though if I didn't know any better it seems Torvista put a lot of effort into making changes supporting the above discovery in the main/parent repository.

29 Sep 2017, 11:00 AM
#2157
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Ceon URI Mapping v4.x

That may have shown proof of concept, but is not an ideal solution to what could be corrected with a minor change of the plugin rather than ZC core code.

Coming from my corner of semi-php-literate, I am of this line of thinking:

  1. breadcrumbs uses the zen_href_link function,
  2. zen_href_link has a notifier available...so that notifier should be available for anything that wants to use it.

It doesn't work, because the breadcrumbs code is loaded before the notifier-observer code.
So that notifier (nor any, I imagine) does not work.
That seems like a core bug to me and nothing to do with any external code that may use the notifier...?

29 Sep 2017, 11:18 AM
#2158
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ceon URI Mapping v4.x

torvista:

Coming from my corner of semi-php-literate, I am of this line of thinking:

  1. breadcrumbs uses the zen_href_link function,
  2. zen_href_link has a notifier available...so that notifier should be available for anything that wants to use it.

It doesn't work, because the breadcrumbs code is loaded before the notifier-observer code.
So that notifier (nor any, I imagine) does not work.
That seems like a core bug to me and nothing to do with any external code that may use the notifier...?
This is the content from the top of includes/init_includes/init_observers.php:

/**
 * auto-load and instantiate all /includes/classes/observers/auto.xxxxxxxxx.php classes
  *
 * This looks for any files in the DIR_WS_CLASSES/observers folder matching the naming convention of "auto.XXXXXX.php"
 * It then automatically "include"s those files.
 * And then it checks to see whether the XXXXXXXXX part of the filename matches a class name using "zcObserver" + the CamelCased XXXXXXXXX string.
 * ie: zcObserverTemplateFrameworkAbc would match auto.template_framework_abc.php
 * If the properly named class exists, then it instantiates that class using an object of the same name.  If the class inside the file is NOT properly named, it will NOT be instantiated, despite being loaded.
 *
 * The assumption is that the class is an observer class which properly extends the base class.
 * All normal observer class behavior applies.
 *
 * This fires at AutoLoader point 175, so all previously-processed system dependencies are in place.
 * [b]If you need an observer class to fire at a much earlier point so it fires before other system processes, you'll need to add your own auto_loaders/config.yyyyy.php file with relevant rules to load those observers.[/b]
 *

It describes how this particular feature of ZC can be used and identifies that if the load point provided doesn't suit the desire operation then to incorporate an alternate means of loading the necessary observer.

Based on the explained logic above that snippet, then one would say that the file should load well before 175 because there are observers throughout the ZC code not just the one that is affected by init_breadcrumbs. It's a sound thought that the fix be to move the load up sooner, but at what cost to the overall process. There are likely those programs that use the auto. style of observer and may actually need it to be at 175 or after the breadcrumbs, modifying the core load sequence to suit the program when the program could be modified to integrate with the core is not the same thing.

29 Sep 2017, 12:55 PM
#2159
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

mc12345678:

Welcome, though if I didn't know any better it seems Torvista put a lot of effort into making changes supporting the above discovery in the main/parent repository.

Of course, thank you Torvista.

10 Oct 2017, 5:48 PM
#2160
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Ceon URI Mapping v4.x

Just to confirm that my Github is now updated with the solution recommended above.