Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Notify_init_canonical_final

    In terms of notifiers here is some of the order I am seeing:

    2019-09-15 06:08:03 [main_page=index] NOTIFY_SEFU_INTERCEPT,
    2019-09-15 06:08:03 [main_page=index] NOTIFY_INIT_CANONICAL_FINAL,
    2019-09-15 06:08:03 [main_page=index] NOTIFY_SEFU_INTERCEPT,
    2019-09-15 06:08:03 [main_page=index] NOTIFY_SEFU_INTERCEPT,
    2019-09-15 06:08:03 [main_page=index] NOTIFY_HEADER_START_INDEX
    2019-09-15 06:08:03 [main_page=index] NOTIFY_HEADER_END_INDEX
    2019-09-15 06:08:03 [main_page=index] NOTIFY_MODULE_START_META_TAGS,
    2019-09-15 06:08:03 [main_page=index] NOTIFY_MODULE_META_TAGS_BUILDKEYWORDS,
    2019-09-15 06:08:03 [main_page=index] NOTIFY_MODULE_META_TAGS_OVERRIDE,
    2019-09-15 06:08:03 [main_page=index] NOTIFY_MODULE_END_META_TAGS
    2019-09-15 06:08:03 [main_page=index] NOTIFY_SEFU_INTERCEPT,
    2019-09-15 06:08:03 [main_page=index] NOTIFIER_CART_COUNT_CONTENTS_START
    2019-09-15 06:08:03 [main_page=index] NOTIFIER_CART_COUNT_CONTENTS_END
    If I try and use NOTIFY_INIT_CANONICAL_FINAL in an observer it fails.

    If I use NOTIFY_MODULE_START_META_TAGS in an observer it is successful.

    The actual code of the observer is not that interesting but it is something like:

    Code:
    <?php
    class zcObserverBlahBlah extends base {
    
      function __construct() {
        $this->attach($this, array('NOTIFY_INIT_CANONICAL_FINAL'));
      }
    
      function update(&$class, $eventID, $paramsArray = array())
      {
          // Blah blah blah
      }
    }
    Looking at the order that things are initiated all seems OK. And I am autoloading it so it happens at 175, which I think should be fine and can't be the issue anyways because it does work with other notify points. What am I missing?

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,486
    Plugin Contributions
    88

    Default Re: Notify_init_canonical_final

    init_canonical.php loads, via /includes/auto_loaders/config.canonical.php, at CP161. That's why you're not seeing that notification if your observer is loading at CP175.

  3. #3
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Notify_init_canonical_final

    Quote Originally Posted by lat9 View Post
    init_canonical.php loads, via /includes/auto_loaders/config.canonical.php, at CP161. That's why you're not seeing that notification if your observer is loading at CP175.
    Thanks, makes sense. Easily solved if I don't autoload.

    Any idea what the logic was for putting the autoloading observers so late in the stack? Not complaining. I am just curious because there seems like a whole load of stuff between about 80 and 161 that are pretty ripe for observers. As I say just curious.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,486
    Plugin Contributions
    88

    Default Re: Notify_init_canonical_final

    Twasn't my decision, but my take is that the majority of observer-class handlers are affecting the post-auto-load functionality of a site, so CP175 seems appropriate.

  5. #5
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Notify_init_canonical_final

    Quote Originally Posted by lat9 View Post
    Twasn't my decision, but my take is that the majority of observer-class handlers are affecting the post-auto-load functionality of a site, so CP175 seems appropriate.
    Just seems odd to have notifier points that do not work if you autoload the class and only work if you manually load it. But I haven't really had much involvement in Zen for several years now so I guess it is just an idiosyncracy that one would be aware of if one did do a lot of zen work.

    But it certainly isn't a big issue.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR