0
Welcome Guest! Login
0 items Join Now

postSaveHook() J3.1.5x

    • drsawbones's Avatar
    • drsawbones
    • Sr. Rocketeer
    • Posts: 154
    • Thanks: 0
    • Joomla Adict

    postSaveHook() J3.1.5x

    Posted 11 years 7 months ago
    • Hi jRT people,

      Here's an oddball issue - not sure if it's Joomla framework or template core at this point.
      I haven't had time (busy with new builds) to sit down and hash out the who, what, where
      but, I think I can answer the "why".

      Here's the error:
      Declaration of ContentControllerArticle::postSaveHook() should be compatible with JControllerForm::postSaveHook(JModelLegacy $model, $validData = Array) in [my-path]/components/com_content/controllers/article.php on line 17

      ...and here is a tracker that was halted for lack of reproducibility:
      joomlacode.org/gf/project/joomla/tracker...racker_item_id=30044

      (gotta love Brian's response!) ;)

      Let me present the how to reproduce this error and see if anyone else can concur.
      "Houston. We may have a bug to track here!"

      Scenario using RT templates example:
      I. Basic Joomla 3.1.5 Framework - work
      a. install HEXERIS template and rok items, and gantry
      b. create a registered user with edit ability and of course your super admin user
      c. check ACL for the guest group - no show if logged in
      create this group if it is missing.

      1. Create a couple public "home" pages / "splash" pages (a mix of a content item and modules)
      1a. Give these pages a menu [Main Menu - Public] all of it's own; make home the default page for the system. Make all the ACL for these items "Public"
      1b. Create a login somewhere here in the public area and make it redirect on login to the home of the restricted menu / pages below in step 2.

      2. Create a couple of new pages (a mix of a content item and modules) - Make one page the main landing page for the redirect from your public area as described in step 1b above.
      2a. Keep the login position from step 1b on your restricted pages (so you can escape if needed - and so you don't get invalid token error if you have to use your back button.)
      2b. Create another menu [Main Menu - Registered] - Make all the items' ACL for this menu - Registered.

      Summary: we have 2 menus and 2 sets of article content.
      (1) menu is public - and directs to articles (1) menu is registered and directs to different articles.

      II. Basic RT Template Manager - work
      1. clone the master style of HEXERIS
      2. assign the main menu - public to the clone (override - public)
      3. clone the master style of HEXERIS
      4. assign the main menu - registered to the clone (override - registered)

      Summary: we should have (2) clones / overrides of the master template style HEXERIS.
      (1) override - Public - is assigned to main menu - pubic
      (1) override - Registered - is assigned to main menu - registered

      III. Menu settings
      1. in the Main Menu - Public assign all the items to ACL Public
      and to the template override HEXERIS - PUBLIC
      2. in the Main Menu - Registered assign all the items to ACL Registered
      and to the template override HEXERIS - REGISTERED

      IV. Other things
      1. install rokpad
      2. install any other famous J-editor like JCE
      3. for the first tests set your editor to rokpad
      4. for the second tests set your editor to JCE or another editor

      V. Front end testing
      1. browse to the public home page and login
      This should redirect you to the home page of the registered ( restricted access) area
      2. on any of the content items click to "EDIT"
      3. "CANCEL" your edit.
      4. Try this at least 3 times from step 1 to 3 completely. (clear all caches)
      5. Try this again with another editor at least 3 times. (clear all caches)
      6. Try this again using your registered user with edit ability login.

      Your result A. ________ what happened?

      Scenario Testing / Results:
      I. What is the expected result?
      a) The expected result is for the system to return you to the home page of the restricted area.
      (or the page you were editing)

      (I use both a WAMP and a fancy dedicated Cloud server, so always assume
      I have tested in both environments, by default. Let me know what you're testing on, Thanks)

      1. if you answered the above question - "it worked as expected"
      Then, let me know this.
      2. if you got something other than the expected result - please tell me
      where you got sent when you cancelled your edit; where you got sent when you saved your edit.

      Scenario Testing / More ideas...
      II. Optional tweak to "force" the correct landing page.
      1. In j-ACP (joomla admin) go to your main menu - restricted and "clone/copy" / "batch" clone your pages to your main menu - public. Check this main menu - public to make sure the ACL to the clones is set to "Registered"
      2. In j-ACP go to your main menu - public and set all previously PUBLIC pages/content to "Guest - no show if logged in. (all but the HOME (default system home) - keep PUBLIC)

      Test again with both editors.
      *RESULTS? - any difference now? hmmm....(yeah, I saw that big boom, too...but only the first time)
      If you check your component redirect you'll see some "pretty" things, too. :) lol - but, not funny.

      OK...so the good news.
      Install CORVUS TEMPLATE - and change all your settings over to
      corvus - public and corvus - registered.
      Run the test again.
      Works perfect doesn't it.

      Like I stated earlier...I haven't had time to snap on the default joomla template
      and test with it or other templates.

      It's quite curious to me that CORVUS TEMPLATE would produce the expected result
      and the STRATUS TEMPLATE would not.

      Hard to say where the bug is crawling out from.
      Is it j-core? template cores? editor frameworks?

      ....but she'll have
      Fun, fun, fun, till her daddy took her Joomla! awaaaaay....

      Regards,
      Doc
      :shock:
    • DanG's Avatar
    • DanG
    • Preeminent Rocketeer
    • Posts: 36750
    • Thanks: 3229
    • Custom work done

    Re: postSaveHook() J3.1.5x

    Posted 11 years 7 months ago
    • Thanks for the heads-up Carleen. I'll definitely give it a whirl and see if I can duplicate your results as I use WAMP also.

Time to create page: 0.045 seconds