Announcement

Collapse
No announcement yet.

fetch_object("currentPost") has no properties

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • fetch_object("currentPost") has no properties

    I spent two hours building a custom postbit and only noticed later that there's a javascript error. I've compared the default postbit and nothing jumps out at me, as far as this error goes. It's definitely something with the postbit, though. Anyone know what I might be missing that could cause this error? I'd really, really hate to have to start from scratch again.

  • #2
    posting your code would realy help

    Comment


    • #3
      The changes are massive, it might not be much help as won't resemble the default template in the least. Was hoping that someone might know what might trigger that error, like a missing CSS ID the javascript is looking for or some such.

      Comment


      • #4
        You're probally missing a id on something, but what is still hard to tell without looking at your code.

        Comment


        • #5
          Well, not sure if this is going to lose you, but here it is
          Attached Files

          Comment


          • #6
            What is the error that you are getting?

            Comment


            • #7
              'fetch_object("currentPost") has no properties

              Comment


              • #8
                I can't find a "currentPost" reference in the default templates. fetch_object is a valid Javascript function but can't find where "currentPost" is sent to it. I also couldn't find a reference to it in any of the Javascript files. Your postbit wouldn't cause this problem unless you have some modification looking for this to be identified for Javascript operations.

                The closest I could find was in showthread_list which is used in threaded and hybrid display modes where there is a Javascript variable set up called curpostid. That is to dynamically show different posts without reloading the page. It is the only place it is used.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API

                Comment


                • #9
                  safiel, I'm sure you're probably no longer suffering from this issue, but I recently encountered it after making some minor template edits of my own and I came across your thread. Thanks to this post at vB.org, I was able to find the solution!

                  Comment


                  • #10
                    Originally posted by LanciaStratos View Post
                    safiel, I'm sure you're probably no longer suffering from this issue, but I recently encountered it after making some minor template edits of my own and I came across your thread. Thanks to this post at vB.org, I was able to find the solution!

                    bump of an old thread but man u just saved me so much time! thank you.

                    Comment

                    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                    Working...
                    X