We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9436
    • 26 Posts
    Hi, I’ve just moved my site from subdir to main directory, everything seems to work except newspublisher , it stopped working properly: I can add new blog entries but new posts have no template at all , just text with no style at all, can anyone help how to fix this please?
    This is code which worked before, and now stopped  sad :
    [!NewsPublisher? &folder=`2` &template=`new_post_tpl` &tpl=`ag_redrounded:blog` &canpost=`Site Admins` 
    &formtpl=`FormBlog` &footertpl=`Comments` &makefolder=`1` &rtcontent=`tvblogContent` &clearcache=`1`!]
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Check the head of that template and make sure the link to the .css file is correct.
        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
        • 9436
        • 26 Posts
        Yes it is fine, I use : [(base_url)]/assets/..  there (in: &tpl=`ag_redrounded:blog) so it has to be fine even after I moved the site .
          • 9436
          • 26 Posts
          I’ve checked in manager and i’ve realised that my new blog entries have no template assigned , in document - edit - general - uses template - it says: blank. If I change it manually into: ’ag_redrounded-blog’ then blog posts looks fine. Is there anything wrong with my code above? (it worked before in differnt directory...)\
          thanks.
            • 36592
            • 970 Posts
            &template=`new_post_tpl`

            Does the template named ’new_post_tpl’ exist in your resources ?
              • 9436
              • 26 Posts
              Yes, it does exist, in chunks, and it worked absolutely fine before I moved webiste to different directory, now it doesn’t... I have no idea what is wrong?
                • 36592
                • 970 Posts
                Check the MODx configuration of default template.
                It is possibly set as ’blank’ ?
                  • 9436
                  • 26 Posts
                  In : tools -> configuration : default template is set up to: ’ag_redrounded’ which is my basic template for all new pages. For blog I use different template :’ag_redrounded:blog’ . When I create new blog entry and I check in manager what template it is using it is set up to ’blank’. When I change it manually to ’ag_redrounded:blog’ it is working fine. Why it doesn’t want to use this template automatically? Is there something to set up I possibly missed after moving site to new directory?
                    • 36592
                    • 970 Posts
                    I looked into NewsPublisher snippet.

                    It looks like &template parameter is specifying the template name to use for newly posted document.
                    If not specified, default template is to be used.
                    (There’s no &tpl parameter in NewsPublisher, I think...)

                    As an trial, why don’t you remove &template (and &tpl) parameter and check if what happens to newly created document ?
                    The default template must be asigned to that document...
                      • 36592
                      • 970 Posts
                      Quote from: fanta at Oct 01, 2008, 04:58 AM

                      Does the template named ’new_post_tpl’ exist in your resources ?
                      Yes, it does exist, in chunks, and it worked absolutely fine before I moved webiste to different directory, now it doesn’t...
                      Wait... in Chunks ? That’s strange.
                      I don’t know why it worked before, but it should be in templates !