We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    I’m trying to put a menu item in a transport package.

    I’ve literally pasted the code for the menu item and the section of the build script from the PackMan component, changing only the package name. The action is installed but the menu item itself it not. Nothing shows up in the component menu or in the right panel of System->Actions.

    I suspect that for a menu item to install, there needs to be some other stuff in place. I’ve tried to create lexicon entries and a controller for it, but I’m still not getting the menu item installed.

    Any idea what I might be missing?

      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 28215
      • 4,149 Posts
      Look at how the Quip, Discuss, Batcher, Rampart, modExtra, or Doodles extras do it.

      You have to addOne the Action to the Menu. Also you have to specify the parent and text keys of the menu.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 3749
        • 24,544 Posts
        Quote from: splittingred at Feb 04, 2011, 11:30 AM

        Look at how the Quip, Discuss, Batcher, Rampart, modExtra, or Doodles extras do it.

        You have to addOne the Action to the Menu. Also you have to specify the parent and text keys of the menu.

        Thanks -- got it working. This is kind of embarrassing. You also have to include this: tongue
        (I was fooled because the namespace showed up in the actions list -- I thought it was an action).
        $builder->putVehicle($vehicle);


        BTW, everything is working fine, but I’m getting a number of these in the console on uninstall (mostly relating to TVs and/or templates).

        PHP notice: Undefined variable: cacheFlag


        Is there any way to avoid this?
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: BobRay at Feb 04, 2011, 11:53 AM

          BTW, everything is working fine, but I’m getting a number of these in the console on uninstall (mostly relating to TVs and/or templates).

          PHP notice: Undefined variable: cacheFlag


          Is there any way to avoid this?
          Just need to figure out where that is coming from and fix it. Might be in the uninstall code or the core somewhere, but we’ll have to debug or get more details to find it...
            • 3749
            • 24,544 Posts
            I have 3 TVs and 2 templates in the package, both are in the same category and they are connected to each other in a script resolver. I get 6 instances of the error message when they are being uninstalled. That might suggest that when a template is uninstalled, something is happening with the detaching of its 3 attached TVs (or their deletion after being detached?).

            If I have time, I can try the debugger, but I suspect it will take quite a while to step through all the uninstall code.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting