We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8921
    • 55 Posts
    Hi, I can't seem to get tabs to work. I have checked, re-checked, re-typed and dumbed down my call. Here's what I'm using:

    [[!NewsPublisher?
    &show=`pagetitle,introtext,content`
    &parentid=`208`
    &usetabs=`1`
    &tabs=`{
        "Main" :    ["pagetitle","introtext"],
        "Content" : ["content"]
    }`
    ]]
    


    All that happens is that all fields are presented as one long form, no tabs.

    Thanks.
      • 3749
      • 24,544 Posts
      Do you have the latest version of NewsPublisher (1.4.1)?


      ------------------------------------------------------------------------------------------
      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
        • 8921
        • 55 Posts
        Yes. Everything was installed fresh just a few days ago. Here's my versions of stuff:

        NewsPublisher 1.4.1
        TinyMCE 4.3.3
        Revo 2.2.4 (traditional)

        Do the tabs rely on any javascript that may not be loading?

        Thanks for your attention to this Bob.
          • 3749
          • 24,544 Posts
          Yes, they're very JavaScript-dependent. If you use FireBug, you may be able to see JS errors. If you have JS turned off in the browser or the Browser's security settings are too strict, that would also explain it. What browser are you using?




          ------------------------------------------------------------------------------------------
          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
            • 8921
            • 55 Posts
            I have tested it in Chrome, Safari and FireFox. I'm also using jQuery on the site, so maybe there's a conflict or perhaps the tabs use jQuery as well and they're trying to load their own version. Javascript gives me something to go on... I'll look in to this further and also test it on a blank template without my jquery call.
              • 8921
              • 55 Posts
              I think I found the culprit. The jquery call NewsPublisher is using seems to have a broken URL:

              <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>


              I'm pretty sure it shouldn't be //ajax.googleapis...

              Any idea as to why it would be doing this and where I can go to edit something to put in the right URL?
                • 3749
                • 24,544 Posts
                It's in core/components/newspublisher/model/newspublisher/newspublisher.class.php, but that URL pulled up the JS when I pasted it just now.

                It could well be a JQuery conflict if you're also loading a different version of JQuery or if your other JS code uses any of the same variables.


                ------------------------------------------------------------------------------------------
                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
                  • 8921
                  • 55 Posts
                  Ok, I've tried it on a blank template (no other jquery or anything else for that matter) and ensured NewsPublisher's jquery call is loading - still not working. I have no idea what to do now, maybe a host specific issue? I'll try it on a different server and see what happens.
                    • 3749
                    • 24,544 Posts
                    Sorry about the trouble. I wish I could look into it more, but I'm buried in work right now.

                    FYI, this tag is working perfectly for me in MODX 2.2.4 (not that that helps you any):

                    <p>[[!NewsPublisher?
                    
                        &initrte=`1`
                        &initDatePicker=`1` 
                        &rtcontent=`1`
                        &rtsummary=`1`
                        &show=`pagetitle,tb_send_date,ShowName,introtext,pub_date,unpub_date,published,content`
                        &captions=`content:Enter Your Post Here,FileTV:MyFileTV,introtext:MySummary,rt1:MyRt1`
                        &usetabs=`1`
                        &activetab=`Main`
                        
                        &tabs=`{
                            "Main" :  ["pagetitle","introtext","content"], 
                            "Dates" : ["pub_date", "unpub_date"], 
                            "Publish" : ["publish"]
                        }`    
                        ]]
                    </p>



                    ------------------------------------------------------------------------------------------
                    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
                      • 8921
                      • 55 Posts
                      No worries. My client can live with it being one long form. Tabs would have been nice, but it's not a deal-breaker. Thanks for taking the time to try and help.

                      PS. I tried the code you pasted above, it also didn't work on my site.