We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32678
    • 290 Posts
    Just installed NewsPublisher and when I click the edit button produced by the snippet, the system redirects to resource ID=22. This resource doesn't exist, and currently the site only has 17 resources in total, so where this behavior comes from is a big mystery.
    Here's the editor code:

    [[!NewsPublisher?
            &show=`pagetitle,description,pub_date,introtext,TV1,TV2`
            &initrte=`1`
            &initdatepicker=`1`
            &rtcontent=`1`
            &rtsummary=`1`
            &parentid=`12`
            &published=`1`
            &captions=`content:Enter Post,introtext:Summary,description:Give a brief description`
        ]]


    and snippet call in the template:
    [[!NpEditThisButton? &editHome=`1`]]


    Any ideas on why this isn't functioning as expected?

    This question has been answered by BobRay. See the first response.

    • discuss.answer
      • 3749
      • 24,544 Posts
      Try adding &np_id=`##` to the edit button tag (where ## is the ID of the NewsPublisher page).

      I think 22 is the ID of *my* NewsPublisher page. wink It's not supposed to be set in the package.

      Check the properties tab of the Edit button snippet.

        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
        • 32678
        • 290 Posts
        Quote from: BobRay at May 21, 2015, 04:54 PM
        Try adding &np_id=`##` to the edit button tag (where ## is the ID of the NewsPublisher page).

        I think 22 is the ID of *my* NewsPublisher page. wink It's not supposed to be set in the package.

        Check the properties tab of the Edit button snippet.


        Yep, I must have run the snippet before removing that param, because '22' was set on the properties tab. All good to go - thanks.
          • 3749
          • 24,544 Posts
          It's not your fault. It's an error in the distribution. I just did a silent update on it. smiley
            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