We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8384
    • 55 Posts
    Front End User can create or edit an entry from the same page by accessing qm-new or qm-edit through QM+. Entries are displayed by using ditto.

    When User edits the workshop (edit button), and selects Save, they get returned to the same page - Hooray! grin
    When User creates a new workshop (new button), and selects Save, the user gets returned to a blank page - Wah! shocked

    User needs to get returned back to the same page they created the entry on. I think it’s something to do with QM settings but haven’t been able to figure out.

    please help.
    Love MODX!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      When I use the "create resource here" button after saving I’m in the newly created page. Default installation of Evo 1.0.4
        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
        • 8384
        • 55 Posts
        The ’Create Resource’ on the drop down menu works fine, it’s the qm new button I have in the template that’s the problem - hopefully I can explain this better below:

        In template ’wkshptemplate’ is
        <!-- qm-new 64 35 'New Workshop'-->


        This code places a button called ’New Workshop’ on the workshop page (id=64). ’New Workshop’ calls up a template called ’workshopinfo’ (id=35). ’workshopinfo’ has various tv’s attached to it, and has a [*content*] call that gets populated with info from chunk ’workshops’.

        Chunk ’workshops’ is called in from the very first template ’wkshptemplate’ through ditto so all workshops can be listed on this page. The code is:

        [!Ditto? &filter=`eventStartDate,@EVAL return time();,2` &tpl=`workshops` &sortBy=`eventStartDate` &sortDir=`ASC` !]
        


        Is this helpful at all? undecided
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Ah, I see. I’ve never used this feature (in fact I wasn’t even aware of it!). Apparently there is more to it than appears; I tried putting <!-- qm-new 1 3 ’New news item’ --> in my template, before the content tags, and nothing happens huh
            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
            • 8384
            • 55 Posts
            Did you do the QM+ setup first? (on evo 1.04 by the by)

            See here:

            http://www.maagit.fi/assets/rte/files/modx/qm-plus-151/readme.html

            I’m sure it’s a really simple thing. It must have something to do with settings in QM+ on the new button but can’t see it.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Ah, that’s the problem... I’m trying to use the QM that comes with 1.0.4, which says it’s version 1.3.4.1

              I’ll install the new version and see what I can see as soon as I get a chance.
                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
                • 16610
                • 634 Posts
                Quote from: easter09 at Aug 08, 2010, 11:46 AM

                When User creates a new workshop (new button), and selects Save, the user gets returned to a blank page - Wah! shocked

                - Verify that the template (id 35) has some content to show.
                - What’s the blank page address? Is it right?
                - Test if adding a new resource works when using admin account.
                - Also please verify that your button code is (note the extra white space before -->):
                <!-- qm-new 64 35 'New Workshop' -->
                  Mikko Lammi, Owner at Maagit
                  • 8384
                  • 55 Posts
                  Susan - let me know how you get on!

                  Lammiko - answers below
                  - Verify that the template (id 35) has some content to show
                  35 is the id of the template that is used to create a new event. When selecting the new button, a window pops up assigned to this template 35. The user fills this in and then hits save and should be taken to the main page id 64 where all the other events have been added.

                  - What’s the blank page address? Is it right?
                  the blank page address is correct in that the id matches the event that was just created. A blank page is seen, with the correct id, but if the user goes back to the main event page, all the information for that event that was added shows.

                  - Test if adding a new resource works when using admin account.
                  the Same result is obtained.

                  - Also please verify that your button code is (note the extra white space before -->)
                  It is correct - I typed it incorrectly above.

                  Thank you for your suggestions and your help. Still trying. undecided
                    • 16610
                    • 634 Posts
                    Quote from: easter09 at Aug 09, 2010, 04:56 PM

                    35 is the id of the template that is used to create a new event. When selecting the new button, a window pops up assigned to this template 35. The user fills this in and then hits save and should be taken to the main page id 64 where all the other events have been added.

                    Ah, then this is your problem. I assume template 35 is empty and is only used for Ditto item content but not showing the actual resource at all. QM+ can’t interpret this situation, it always tries to show the newly added resource and not the resource where the add new button is.

                    You can solve this by making a new snippet and putting it in to template 35 to fall back to main Ditto listing resource.

                    Snippet:
                    <?php
                    // Snippet name: ForwardTo
                    $forwardId = $modx->documentObject['parent']; // You can change this to any id if your individual Ditto items are not located directly under the main Ditto listing
                    $modx->sendForward($forwardId);
                    ?>
                      Mikko Lammi, Owner at Maagit
                      • 8384
                      • 55 Posts
                      grin

                      That was exactly it. Thanks Lammikko!!