Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Takes some time for embedding to work

On my forums it takes a day or two for the embedding to work. Until then it only shows a regular link. But once it shows up, everything seems to work properly.

At first I assumed it was just my browser cache but even after deleting my entire history/cache it didn't make a change. So, now I'm thinking that it has to do with my server cache. We have a heavy server load on my main site so we leverage a combination of APC and Memcached for our caching needs. I have a feeling that both of those are also caching the forums and until they update their cache it causes the embedding not to work. Of course, I'm only guessing because I don't know for sure how it works.

Do you think this could be the reason why it's taking time for the embedding to perform? And how should I deal with it aside from manually deleting my entire site cache every time someone posts a Youtube link?

«1

Comments

  • SrggamerSrggamer HardCore Gamer ✭✭✭

    Is it Wordpress?

  • My regular site is Wordpress but we don't embed the forums into the site. We direct the visitor over to the separate Vanilla forum.

  • lifeisfoolifeisfoo Zombie plugins finder ✭✭✭

    I can't undestand if your Mediator work or not properly.

    If you have media urls in posts/comments views showed up correctly, but images not embedded, remember that Mediator start on document ready and search every .Message a element: be sure that your links respect this format.

    There was an error rendering this rich post.

  • MenasheMenashe New
    edited April 2013

    It's the very same links that start off not embedding properly but after a day or two they begin to work. So, I don't think it has to do with the format because they do show up embedded a day or two later. I just don't understand why it doesn't work right away.

    Just to add some info, I'm getting an error showing up in the console for mediator.js. It says: "Uncaught TypeError: Cannot read property '1' of null" and it says it's referring to this line of code in the script file: file: "urlo.pathname.match(/\/([^\/?&])[^\/]$/)[1],"

  • lifeisfoolifeisfoo Zombie plugins finder ✭✭✭

    Ah ok, now I understand your caching-based-trouble idea.

    Have you tried to set $Configuration['Cache']['Enabled'] = FALSE; in your conf/config.php and then posting a new message with a media link?

    There was an error rendering this rich post.

  • Ok, I tried making that change to the config.php but is still didn't work. I even wiped my whole browser cache/history clean to make sure my browser wasn't interfering but it didn't work.

    And that error "Uncaught TypeError: Cannot read property '1' of null" is still coming up on mediator.js

  • hgtonighthgtonight ∞ · New Moderator

    I would be happy to look into it if you provide a link to your site. :D

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • hgtonighthgtonight ∞ · New Moderator

    I could not find anything wrong on the client end. You do have two errors reported in the console. (These are prolly unrelated, but I will PM you the details).

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • SrggamerSrggamer HardCore Gamer ✭✭✭

    @Menashe said:
    Thanks hgtonight. My site is http://nintendoenthusiast.com and the forums are at http://nintendoenthusiast.com/forums

    This doesnt look like a vanilla forum, nice work!

  • @Menashe,

    I have attempted to fix the error messages you receive with https://github.com/swook/Mediator/commit/0e00d16dceb6931990168f53ab5a26051e2988c3

    A new version has been uploaded with the fix.

    Please do let me know if the odd delay issue is still there. At the moment I have no idea why it would do that.

    Thanks!

  • @swook said:
    Menashe,

    I have attempted to fix the error messages you receive with https://github.com/swook/Mediator/commit/0e00d16dceb6931990168f53ab5a26051e2988c3

    A new version has been uploaded with the fix.

    Please do let me know if the odd delay issue is still there. At the moment I have no idea why it would do that.

    Thanks!

    Thanks, I'm going to try it out again. Hopefully it works this time.

    @Srggamer said:
    This doesnt look like a vanilla forum, nice work!

    Thanks! It's based on the Traditional Plugin/Traditional Chocolate Theme found in the Addons list. But, of course, we modified it heavily.

  • businessdadbusinessdad Stealth contributor MVP

    @Menashe said:
    Thanks! It's based on the Traditional Plugin/Traditional Chocolate Theme found in the Addons list. But, of course, we modified it heavily.

    I sneak in with an off topic just to give you my compliments for the result. I also developed an entire theme based on the "Traditional" suite and I know how much work it requires. Well done. :)

  • It works! And it looks really great in action (and there's no more time delay happening.)

    I left a thanks and shoutout to @swook on my forum in appreciation for taking the time to work on the fix: http://nintendoenthusiast.com/forums/discussion/comment/23735#Comment_23735

    @businessdad said:
    I sneak in with an off topic just to give you my compliments for the result. I also developed an entire theme based on the "Traditional" suite and I know how much work it requires. Well done. :)

    Most of the work was actually done by one of the volunteer staff members on our site who is a really great web programmer. I just took over the styling and made some changes once it was 4/5 done.

  • It works! And it looks really great in action (and there's no more time delay happening.)

    I left a thanks and shoutout to @swook on my forum in appreciation for taking the time to work on the fix: http://nintendoenthusiast.com/forums/discussion/comment/23735#Comment_23735

    @businessdad said:
    I sneak in with an off topic just to give you my compliments for the result. I also developed an entire theme based on the "Traditional" suite and I know how much work it requires. Well done. :)

    Most of the work was actually done by one of the volunteer staff members on our site who is a really great web programmer. I just took over the styling and made some changes once it was 4/5 done.

  • Thanks for letting us know! Glad it worked out :)

  • Is this supposed to work with straight mp3 links? I've been trying to find a way to embed direct links to mp3 files.

  • @imijj said:
    Is this supposed to work with straight mp3 links? I've been trying to find a way to embed direct links to mp3 files.

    I can't imagine that would work because an mp3 file needs a piece of software to play it. That's why Youtube or Soundcloud will work because they allow embedding of the actual web app which will run the video or play the music. So unless you upload the mp3 to soundcloud, bandcamp, or a video host, i doubt it will be possible to embed it.

  • Hi. I am trying to Mediator on Vanilla 2.1beta and it only shows links. It worked fine on 2.0. Any ideas?

  • It is fine now. Just a delay. Possibly the server. Thank you anyhow!

Sign In or Register to comment.