We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4648
    • 1 Posts
    Hi,

    I’m experiencing problems with recreating http://modxcms.com/blog-publish.html in a location other than the root of my MODx install. Specifically, I’ve been trying a setup like this:

    *root (1)
    |- Some page #1 (2)
    |- Some page #2 (3)
    |- Folder containing NewsListing snippet (4)
    |- Blog post #1(6)
    |- Blog post #2 (7)
    |- Page containing NewsPublisher snippet (5)

    Calling NewsPublisher like this:
    [!NewsPublisher?&folder=`4`&canpost=`BlogAdmins`&makefolder=`0`&postid=`4`&template=`blogtemplate`&showinmenu=`1`&formtpl=`BlogForm`&rtcontent=`tvblogContent`!]

    Going to page id=5, I get the expected editing form, which I can submit and get directed to the post’s page (e.g. id=8). However, this new page doesn’t appear under the intended containing folder (id=4). If &makefolder=`1` then posts can be seen to be inserted under id=5 in both the DropMenu output and in the MODx manager, however if &makefolder=`0` the post doesn’t show up in either the DropMenu output or even in the MODx manager! (Editing the id=5 document to be a folder shows that the post has actually been inserted as a child of it, even though it was set to behave as a document and &makefolder=`0`....what’s that about then? undecided)

    Please can anyone suggest (i) What I might be doing wrong and how to fix it (ii) How you can identify documents that are present on the server but not showing up in the Manager without potentially massive trial and error?

    Cheers for any help!
    C

    (Using Apache2 on Debian Linux (Sarge), PHP 4.3.10 & MySQL 4)
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      As far as the makefolder issue goes, if your new document is given a parent id of a document that is not set to be a folder, the tree in the manager will not find it, as it depends on the is_folder field being set to 1 to trigger a lookup of child documents to display.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 9583
        • 25 Posts
        I think what Carmady’s saying is that he’s trying to have the snippet living on a document (#5) publish to a different folder (#4), but the document is showing up as a child of the document the snippet is on (#5) no matter what. And the only way to tell that it’s happening is if he goes and sets document #5 as a folder.

        I ran into the exact same thing, but wound up dropping the project for a while and haven’t been able to revisit it to figure out a workaround. I want to have a "submission" form where you can select the (existing) folder a document gets published to, but it’ll just publish itself as a child of the form document no matter what’s set. tongue