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
    Quote from: pauhana at Jun 13, 2014, 07:14 AM
    Ok, there are definitely gremlins at work here.

    . . . I'm beginning to suspect that there's something wrong with the basic ModX install.

    I agree. It really looks like MODX is sending the back-ticks in the $scriptProperties array. That should never happen. I guess it could be a character set issue where MODX is not recognizing the back-ticks for what they are.

    Here is something to try. Create a snippet called Test with this code:


    $value = explode(',', $scriptProperties['value']);
    return '<pre> . print_r($value, true);



    Then put this tag on a page and view it:

    [[!Test? &value=`one,two,three`]]


    If you see back-ticks in the output in addition to the three values, it's definitely not a NewsPublisher problem.

      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
      • 3749
      • 24,544 Posts
      Coincidentally, I just ran into this exact problem due to a typo. Make sure none of the properties in your NewsPublisher snippet tag has a semicolon (;) at the end (or anywhere).
        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
        • 47562
        • 113 Posts
        Quote from: BobRay at Jun 14, 2014, 11:11 PM
        Coincidentally, I just ran into this exact problem due to a typo. Make sure none of the properties in your NewsPublisher snippet tag has a semicolon (;) at the end (or anywhere).

        Hey Bob.

        Thanks for the suggestions.

        I ran through the test snippet, and the results look to be as expected:

        Array
        (
            [0] => one
            [1] => two
            [2] => three
        )


        I've tinkered with trying different things in the NP call (like changing template to the name string); still no luck.

        Current call being made is:
        [[!NewsPublisher?
        &show=`pagetitle,longtitle,pub_date,introtext,content`
        &template=`cp_news_entry_template`
        &initdatepicker=`1`
        &parentid=`18`
        &captions=`content:Body,introtext:Summary,pub_date:Date`
        ]]
        


        Current error reads:

        Failed to get template: .`cp_news_entry_template`
          • 3749
          • 24,544 Posts
          It could be an issue with the underscores in the template name (or case-sensitivity).

          What happens if you just do this?

          [[!NewsPublisher?
              &show=`pagetitle,content`
          ]]
          




            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
            • 47562
            • 113 Posts
            Quote from: BobRay at Jun 16, 2014, 12:17 AM


            What happens if you just do this?

            [[!NewsPublisher?
                &show=`pagetitle,content`
            ]]
            



            The form shows up fine, with the title and content panes.
              • 3749
              • 24,544 Posts
              OK, now try this:

              &show=`pagetitle,longtitle,introtext,content,published`
                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
                • 47562
                • 113 Posts
                Quote from: BobRay at Jun 16, 2014, 05:45 PM
                OK, now try this:

                &show=`pagetitle,longtitle,introtext,content,published`


                Hey Bob.

                Thanks for sticking with me!

                Ok, you're gonna think I'm nuts, but here goes. After playing around a bit, I see the following:

                This works:

                [[!NewsPublisher?
                    &show=`pagetitle,content`
                ]]


                but this does not:

                [[!NewsPublisher? &show=`pagetitle,content`]]
                


                Same goes for any combination of params; this works:

                [[!NewsPublisher?
                    &show=`pagetitle,longtitle,introtext,content,published`
                ]]


                but this does not:

                [[!NewsPublisher? &show=`pagetitle,longtitle,introtext,content,published`]]
                


                I have no idea why that is. When I say it "doesn't work", I mean it flags the first param in the list:

                Sorry . . . There were one or more problems in producing the form:
                You wanted to display a TV, but this template doesn't have it: pagetitle

                (so kick out pagetitle and see the same message for longtitle, etc etc).

                So somethin' really goofy at work here...
                  • 3749
                  • 24,544 Posts
                  The only things I can think of to explain that is that the space after the ? is not being recognized as a space, the ? is not being recognized as a ?, or some corruption of the file containing the parser code (though that would normally cause trouble all over the site).

                    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