HTML widget doesn't save content

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shahz
    New Member
    • Oct 2010
    • 21
    • 4.0.x

    [CMS] HTML widget doesn't save content

    Hey guys,

    I've been trying to add content in the HTML widget but everytime I hit the "save" button, the content is not saved. I also tried altering the already available widgets, but in vain. I know there is something I'm doing wrong most probably as such a huge feature can't be a bug for a forum like vBulletin.

    Help is greatly appreciated.

    Thanks

    Shahz
  • Trevor Hannant
    vBulletin Support
    • Aug 2002
    • 24188
    • 5.7.X

    #2
    To troubleshoot this, first reupload all the original vB non-image files (except install.php). Make sure you upload these in ASCII format and overwrite the ones on the server. Also be sure to upload the admincp files to whichever directory you have set in your config.php file. Then run 'Suspect File Versions' in Diagnostics to make sure you have all the original files for your version and that none show 'File does not contain expected contents':

    Admin CP -> Maintenance -> Diagnostics -> Suspect File Versions

    [Note: In some cases you may also need to remove any of the listed .xml files in the includes/xml directory.]

    Next, disable all plugins.

    Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

    define('DISABLE_HOOKS', true);

    Then if you still have this problem, create a new style and choose no parent style. This will force it to use the default templates. Finally empty your browser cache, close all browser windows then try again. Make sure you change to the new style and view your forums with it.

    Do you have the same problem?
    Vote for:

    - Admin Settable Paid Subscription Reminder Timeframe (vB6)
    - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

    Comment

    • shahz
      New Member
      • Oct 2010
      • 21
      • 4.0.x

      #3
      Hello Trevor,

      Thanks for the response and sorry for getting back late. I have been trying all the solutions that you suggested, in all arrangements and what not. The problem is still not completely rectified.

      I did not get any errors when I did the file versions test. I disabled all the plugins. I also created a totally new style (which didn't do much difference).

      However, when I set the default style to default template, then things start to work a bit. But this did not fix everything. Is there any limitation on widgets content? I am trying to add this code (feel free to use for testing if you want to. Its just a twitter script):

      Code:
      <script src="http://widgets.twimg.com/j/2/widget.js"></script>
      <script>
      new TWTR.Widget({
      version: 2,
      type: 'profile',
      rpp: 10,
      interval: 3000,
      width: 250,
      height: 300,
      theme: {
      shell: {
      background: '#e1e1e1',
      color: '#424242'
      },
      tweets: {
      background: '#ffffff',
      color: '#424242',
      links: '#79a21b'
      }},
      features: {
      scrollbar: true,
      loop: false,
      live: false,
      hashtags: true,
      timestamp: true,
      avatars: true,
      behavior: 'all'
      }}).render().setUser('TheLimeDesign').start();
      </script>
      Now, I can't save this code snippet. But, if I remove the last </script> tag, it can save the widget with content. I replaced the last </script> tag with (/script) and it was saved too (although its not the correct syntax). Basically, the last closing script tag is not being accepted. Any ideas?

      Comment

      • Lynne
        Former vBulletin Support
        • Oct 2004
        • 26255

        #4
        I was able to save it just fine.

        Please don't PM or VM me for support - I only help out in the threads.
        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
        Want help modifying your vbulletin forum? Head on over to vbulletin.org
        If I post CSS and you don't know where it goes, throw it into the additional.css template.

        W3Schools &lt;- awesome site for html/css help

        Comment

        • shahz
          New Member
          • Oct 2010
          • 21
          • 4.0.x

          #5
          I'm starting to believe that this might be a browser issue..Which browser are you using sir? I don't see a point of having AJAX to handle option saving stuff to be honest

          Comment

          • shahz
            New Member
            • Oct 2010
            • 21
            • 4.0.x

            #6
            Crack! Now the widgets AJAX box is not loading again! This shouldn't be this tough really.

            Comment

            • Lynne
              Former vBulletin Support
              • Oct 2004
              • 26255

              #7
              I'm using firefox.

              Make sure when you login to your admincp, that you are using the same url you enter for the forums in vboptions > general site options. (If you have www.yoursite.com, then you need to login to www.yoursite.com, not just yoursite.com)

              Please don't PM or VM me for support - I only help out in the threads.
              vBulletin Manual & vBulletin 4.0 Code Documentation (API)
              Want help modifying your vbulletin forum? Head on over to vbulletin.org
              If I post CSS and you don't know where it goes, throw it into the additional.css template.

              W3Schools &lt;- awesome site for html/css help

              Comment

              • shahz
                New Member
                • Oct 2010
                • 21
                • 4.0.x

                #8
                Thanks Lynne..Yeah, it was the URL indeed the reason why AJAX was not functioning..Now, the box does load, but the other propblem persists..I can't seem to close the last </script> tab..It saves only up to </script The moment I add the last bracket, it doesn't save anymore..

                Comment

                • Removed-836727
                  Banned by User Request
                  • Apr 2006
                  • 1274

                  #9
                  try

                  <vb:literal>
                  your code
                  </vb:literal>

                  the problem is, that the template engine doesn't work with some js codes if you don't add the vb:literal , but you don't get any error message if it's not working
                  for me it's a bug but the team said "working as designed.."

                  Comment

                  • shahz
                    New Member
                    • Oct 2010
                    • 21
                    • 4.0.x

                    #10
                    Thanks for the suggestion ragtek, but that didn't work too I covered the script tags with the codes that you provided, but it didn't work

                    Comment

                    • Lynne
                      Former vBulletin Support
                      • Oct 2004
                      • 26255

                      #11
                      shahz, why don't you put in a ticket and include admin access to your site so I can check this out.

                      Please don't PM or VM me for support - I only help out in the threads.
                      vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                      Want help modifying your vbulletin forum? Head on over to vbulletin.org
                      If I post CSS and you don't know where it goes, throw it into the additional.css template.

                      W3Schools &lt;- awesome site for html/css help

                      Comment

                      • shahz
                        New Member
                        • Oct 2010
                        • 21
                        • 4.0.x

                        #12
                        Lynne, can I send you a PM sir?

                        Comment

                        • Removed-836727
                          Banned by User Request
                          • Apr 2006
                          • 1274

                          #13
                          i've tried your code and it's working fine for me without the vb:literal tag.

                          demo: http://www.ragtek.org/vb4/content.php

                          Comment

                          • shahz
                            New Member
                            • Oct 2010
                            • 21
                            • 4.0.x

                            #14
                            Hey ragtek,

                            I know, the code is indeed functional. Like I said in my first post, there must be something really wrong that I might be doing or some setting that is misconfigured which is causing this problem.. :S

                            Comment

                            • Lynne
                              Former vBulletin Support
                              • Oct 2004
                              • 26255

                              #15
                              Originally posted by shahz
                              Lynne, can I send you a PM sir?
                              You may. Or, you can also put in a ticket attention to me also.

                              (And I'm a she. )

                              Please don't PM or VM me for support - I only help out in the threads.
                              vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                              Want help modifying your vbulletin forum? Head on over to vbulletin.org
                              If I post CSS and you don't know where it goes, throw it into the additional.css template.

                              W3Schools &lt;- awesome site for html/css help

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎