We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3109 ☆ A M B ☆
    • 894 Posts
    So I'm using Newspublisher so my client can edit his site in the front end and I'm running into an issue with Articles and Newspublisher.

    I've followed Bobs instructions here but every time I add a new blog post I can view it but it's not in the articles container in the manager or in the blog section with the rest of the articles.

    Here is my Newspublisher call:

    [[!NewsPublisher? 
    &parentid=`18` 
    &show=`post-image,pagetitle,content,published` 
    &cssfile=`assets/style.css`  
    &initrte=`1` 
    &rtcontent=`1` 
    &template=`11` 
    &published=`1` 
    &hidemenu=`1` 
    &classKey=`Articles`]]
    


    After inspecting my error log I get this:

    (ERROR @ /index.php) Could not load class: Articles from mysql.articles.
    


    In Bob's site it says to use &classkey=`Articles` but when I do that I get this error:
    Fatal error: Call to a member function set() on a non-object in /home/content/68/9614668/html/core/components/newspublisher/model/newspublisher/newspublisher.class.php on line 350
    


    So I'm not sure if it should be &classkey or &classKey like I have it in my code which at least posts something. [ed. note: benmarte last edited this post 14 years, 1 month ago.]
      Benjamin Marte
      Interactive Media Developer
      Follow Me on Twitter | Visit my site | Learn MODX
      • 3109 ☆ A M B ☆
      • 894 Posts
      For those who ever try to accomplish this the correct code to use is:

      &classkey=`Article`
      


      Here's my Newspublisher call after the correction:

      [[!NewsPublisher? 
      &parentid=`18` 
      &show=`post-image,pagetitle,content,published` 
      &cssfile=`assets/style.css`  
      &initrte=`1` 
      &rtcontent=`1` 
      &template=`11` 
      &published=`1` 
      &hidemenu=`1` 
      &classkey=`Article`]]
      


      Thanks to Bobray via twitter
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
        • 3749
        • 24,544 Posts
        Sorry for the confusion. The docs are corrected.


        ------------------------------------------------------------------------------------------
        PLEASE, PLEASE specify the version of MODX you are using.
        MODX info for everyone: http://bobsguides.com/modx.html
          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
          • 3109 ☆ A M B ☆
          • 894 Posts
          No worries Bob I appreciate your help I hope someday I can return the favors smiley
            Benjamin Marte
            Interactive Media Developer
            Follow Me on Twitter | Visit my site | Learn MODX
            • 30269
            • 119 Posts
            Not quite sure if this relates to the above: But...

            How can we let the Filebrowser in Newspublisher adhere to Media Sources? (2.2.4)
              • 3109 ☆ A M B ☆
              • 894 Posts
              Tom that is not controlled by NewsPublisher that is all controlled by MODX ACL permissions
                Benjamin Marte
                Interactive Media Developer
                Follow Me on Twitter | Visit my site | Learn MODX