1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not a Bug "Please post a valid message" error when skimlinks installed on anything but Default theme

Discussion in 'Resolved Bug Reports' started by graham_w, Jan 28, 2012.

  1. graham_w

    graham_w Active Member

    I've had users complaining of not being able to post, getting an error "Please post a valid message". Some users are getting javascript errors. Others not. It seems to be a range of browsers, but mostly IE.

    I was able to recreate the issue on my active board using IE9, and when I removed the skimlinks js the error stopped.

    I setup a vanilla Xenforo install and added skimlinks, it worked fine.

    BUT if you add a second style to the vanilla Xenforo (no parent) and then add skimlinks it throws the error.

    Line: 283
    Error: Object doesn't support property or method 'context'

    Then if you try and type a message in quick reply and try to post it and you get the Xenforo error "Please enter a valid message"

    Steps to recreate error

    I recreated the error by changing the following settings in IE9.

    Make sure the 3 settings marked below in IE were as per the screen shot

    View attachment 24071

    * Uncheck "Disable script debugging (Internet Explorer)"
    * Uncheck "Disable script debugging (Other)"
    * Check "Display a notification about every script error"

    In a vanilla Xenforo install, add skimlinks js code to page_container_js_body in default theme. Login to the forum and visit a thread - this works fine.

    Now create a second theme (no parent) and add skimlinks js code to page_container_js_body.

    Log in to the forum and view a thread, now it gives the error

    Line: 283
    Error: Object doesn't support property or method 'context'

    Then type any message in quick reply and try to post it and you get the error "Please enter a valid message"
  2. Mike

    Mike XenForo Developer Staff Member

    I'd recommend contacting Skimlinks about that - if adding their JS triggers the problem, then that's where debugging should happen.
  3. John Maguire

    John Maguire New Member

    Hi Graham, just wanted to follow up on this thread that this is currently being investigated and we will post our findings both here and in private email to you.
    If you or any other members of the forum have any questions while we are investigating this, please let me know.
    Thanks! John @ Skimlinks
  4. DBA

    DBA Well-Known Member

    Hey John, I also had to disable skimlinks until this error is fixed.

    Awaiting your reply that it's been fixed. (y)
  5. DBA

    DBA Well-Known Member

    Can you confirm that XF 1.1.2 fixed this? I'm no longer getting the error with skimlinks enabled.(y)
  6. graham_w

    graham_w Active Member

    It seems that the error is no longer happening in 1.1.1 either so skimlinks must have fixed the issue.

    Haven't heard anything from them about it yet though. John - can you confirm ?
  7. Cooper

    Cooper Active Member

    I'm having this issue on my board atm.
  8. graham_w

    graham_w Active Member

    I heard from skimlinks and they've said they can't fix the issue. They told me to go back to the theme designer. Considering I can reproduce this on a vanilla Xenforo board just by adding a new theme, not make any changes (apart from adding the skimlinks js) I hardly think it's related to the theme.

    I haven't checked if it's still happening - im now using another provider and their script works fine.
  9. DBA

    DBA Well-Known Member

    I was also still having issues. I've since switched to Viglinks. (y)
  10. Rudy

    Rudy Well-Known Member

    I'm on the stock XF theme running XF 1.1.1 and having the same problem--all I've done is change the color scheme. And...yes, I have Skimlinks installed. That seems to be a common thread here.

    I do have VigLink available to me, so I may have to switch back to them until this is fixed...IF this is the problem. I cannot go without monetization, though--it is the only thing keeping the forum afloat.
  11. graham_w

    graham_w Active Member

    So you didn't create a new stock theme and change it - all you did was change the stock theme ? If that's the case i'll see if I can recreate that on my test board. It has to be a problem with the skimlinks js as it only happens with their js loaded and no other addons on the forum, but as per earlier posts skimlinks either can't find the issue or don't want to. It's a shame, but it seems like viglink is the way to go on Xenforo.
  12. Rudy

    Rudy Well-Known Member

    I meant that I didn't install any other non-XF themes. I do have three different themes, but they are basically just copies of the default XF theme done in different colors. So IOW, nothing else has been changed except for the colors which are, essentially, just changes to CSS if you think about it. (No other template changes, IOW.) I do have other addons installed, but those have been there for several months (since late spring/early summer last year), and this problem didn't start until recently (and nothing else has changed on the form). I've had Skimlinks for a few months (installed January), so either my users didn't start reporting it until early this month, or they changed their JS recently which clashed with XF.

    I switched the forum back to VigLink and am going to see if anyone reports the error has gone away. Nothing yet, but we're not that busy. If it is indeed a Skimlinks problem, and they refuse to fix it, I urge others to join me in letting them know that we've switched away from their service to VigLink since it doesn't cause problems.
  13. graham_w

    graham_w Active Member

    Yep that's all it takes to get the error. Works fine on the default theme, but then create a new theme (which will end up being the default xenforo skin) , add skimlinks js and BINGO! You get errors. My first post shows exactly how to reproduce it.

    It seems that the js error comes and goes, I've found other threads stating that it stops erroring for a period then all of a sudden it comes back again. As above it seemed to stop erroring around the time 1.1.2 was released, but I have a test board running 1.1.1 and it wasn't erroring any more either so it wasn't any changes in Xenforo. I haven't checked if it's erroring now as I've given up caring about it. I can't/don't want to risk my users being able to post one day and then can't the next. I've moved on and been using viglink with no problems since my users started reporting this skimlinks error and had no issues so you'll be fine.
  14. Rudy

    Rudy Well-Known Member

    That's interesting! There should be nothing different between the themes other than colors.

    Regardless, Skimlinks should work without error on whatever code is presented (provided it is not buggy), so I would not even consider this to be an XF problem.

    One of my moderators (who is stationed in Afghanistan right now) is only able to get on once per day, and he says it is always with his first reply of the day that he gets the message. Once he refreshes the page and makes a post, the error goes away and he's able to post without incident for the rest of the day. It seems like any new session is what triggered it.

    Using Chrome, I'd never come across the error, so I don't even know if it was browser-dependent or not. Then again, I never log out, but I do often have to refresh since I get the "security error" if I go to hover over my alerts to see what is new. And now that I think of it, I should see if that error went away after removing Skimlinks as well...maybe it has something to do with sessions.
  15. Rudy

    Rudy Well-Known Member

    In all honesty, I moved to Skimlinks since they offered a better popup on highlighted keywords, and I like that I can add my own domains rather than pester VigLink with them. Beyond that, I really like how VigLink has treated me. I have a "big board" forum using it, and numerous other forums and sites, and their response has always been top notch any time I've contacted them. Skimlinks takes forever to pay, also. They're about three months out vs. VigLink's two. Skimlinks won't be paying on December until the end of March.

    I'm now deciding if overall, I want to put everything back with VigLink or keep it split between the two. The business case dictates that I never put all my eggs in one basket...
  16. JaredNZ

    JaredNZ Member

    For future reference if anyone else stumbles on this error: the real cause is duplicate declaration of jQuery - check the raw source code and make sure its only been declared once.
    trilogy33 and Cooper like this.
  17. Cooper

    Cooper Active Member

    Skimlinks code? Do you know which file and line? Would be great to see the back of this problem!
    trilogy33 likes this.
  18. JaredNZ

    JaredNZ Member

    Personally I had the whole forum wrapped in my own header, and my header called for jquery. The XenForo header also calls for jquery, so the two clashed.

    I'm not familiar with skimlinks code, but possibly if they're using jquery (likely) they need to remove it from their script and rely on the forum's copy (which was my solution).
    trilogy33 likes this.
  19. Brent W

    Brent W Well-Known Member

    We are getting these errors as well across my xenForo sites, all with skimlinks on them. Looking at the SkimLinks javascript I am seeing Jquery being loaded within that. Going to remove Skimlinks and see if that kills the complaints.
  20. trilogy33

    trilogy33 Well-Known Member

    There's one way around it, it's a bit hacky and involves having both Skimlinks and Viglinks accounts.
    Simply set a conditional for logged out users to see the skimlinks code only and where your users are logged in, to show the Viglinks one instead.
    If you're knowledgable about adding conditionals to your footer template to do this then that's cool. :)
    If not, I can post up the entire code, all you'd have to do is replace your skim and vig code with my blank entry.
    I did and it killed the problem instantly.
    Obviously this is only going to work if you have both Viglinks and Skimlinks accounts.

Share This Page