WordPress.org

Ready to get started?Download WordPress

Forums

WP Vanilla Connect
[resolved] Fixing Redirect URL problem / embedded Vanilla (12 posts)

  1. DaveKennedy
    Member
    Posted 3 years ago #

    I found the login redirect didn't work on my site where I'm using the Vanilla Forums plugin to embed the forum in a WordPress page. (Vanilla is installed in a folder /vanilla )
    In wp-vanilla-connect.php I added the text index.php?p= to change this:

    function getVanillaAutoLoginURL(){
    return $this->vanilla_host . '/entry/jsconnect?client_id=' . $this->get_clientID();
    }

    to this:

    function getVanillaAutoLoginURL(){
    return $this->vanilla_host . 'index.php?p=/entry/jsconnect?client_id=' . $this->get_clientID();
    }

    and now it works just fine.

    If making the change after installation you also have to go into the Vanilla jsConnect plugin and make the equivalent change to its login url.

    Another thing to watch is the WordPress permalink setting. If left at default you can't change the target page embed setting in the Vanilla Forums plugin. If you use a non-default permalink setting you can change the target page.

    http://wordpress.org/extend/plugins/wp-vanilla-connect/

  2. nickiler
    Member
    Plugin Author

    Posted 3 years ago #

    Hey Dave,

    Thanks for downloading and trying WP Vanilla Connect, and another thanks for solving the code conflict in the embed URL and posting for others. I can't get the Vanilla Embed to work with my network setup, so it wasn't meant to work in the first place, as posted in the Q and A section.

    I'm going to see if I can either tweak the URL to work with both or I'll just add an experimental checkbox to add the correct URL structure to support vanilla embed.

    I will up the version from 1.1 to 1.2 as this was not a standard feature and not considered a bug, but rather a feature request and push the updates out sometime today.

    Sincerely,

    Nick

    Notice: That function has nothing to do with the actual operation of WP Vanilla Connect and merely, automagically generates a URL for you based on your WordPress installation. You could just as easily write these manually with some WordPress dev knowledge.

  3. nickiler
    Member
    Plugin Author

    Posted 3 years ago #

    Hey Dave, Did you change anything else for your embed install? I noticed that adding the query string /index.php?p= followed by the remaining URL breaks the auto login process for non-embeded sites. This could be a bug in jsconnect.

    So, now my only choice is to just add a checkbox that will append /index.php?p= to the beginning of the URL for Vanilla Embedded URL without any guarantee's it works or not. I can't offer support for a product I can't reproduce.

    FAQ: http://wordpress.org/extend/plugins/wp-vanilla-connect/faq/

  4. DaveKennedy
    Member
    Posted 3 years ago #

    Hi Nick. Didn't change anything else, but haven't tested it non-embedded yet. Right now I don't want to change something that's working!
    In your post above there's a / in front of the index.php?p which I didn't have.
    If you post a new version I'll test it with embedded Vanilla.

  5. DaveKennedy
    Member
    Posted 3 years ago #

    Nick: if you email me at dave@forestferns.net I'll let you have the url of the site I'm working on so you can see what happens.

  6. nickiler
    Member
    Plugin Author

    Posted 3 years ago #

    Hey Dave, did you fill in the Vanilla host URL on in the WPVC plugin? If not its possible your using a relative URL instead of a root URL. I'll shoot you an email so I can see whats going on.

  7. nickiler
    Member
    Plugin Author

    Posted 3 years ago #

    Hey Dave, I just managed to get the embedded vanilla forums going on my local web server with version 1.1 of WP Vanilla Connect and the login works flawlessly.

    * What version of WP are you using? I haven't tested it below 3.0, but I'm pretty sure it should work just fine on version 2.7 and above.

    * Do you have mod_rewrite enabled in your Apache? You have to look for your ../httpd.conf and do a word search for mod_rewrite and make sure its enabled. Its a must have feature anyway even it does not solve the problem.

    * What version of Apache? Tested with 2.2.21. Running this command works for me httpd -v, but you may have to find out the exact name of the apache executable. apachectl -v is another I use for my Mac.

    If you want to email these, that's ok, but for the sake of documenting for others to benefit it would be nice to post as much details on this page.

    Thanks,

    Nick

  8. nickiler
    Member
    Plugin Author

    Posted 3 years ago #

    After doing more testing I can't re-produce any problems with the current version 1.1 of WPVC. Another problem I see here is that the code you are using hasn't even been updated for almost a year. And the Vanilla Team has not answered a question for just as long, from that account. Vanilla-Forums - Profile.

    I'm surprised the plugin hasn't crippled itself, yet.

    Looking over the change log for the Vanilla Embedded:

    1.0.4 (345 days old)
    - Fixed validation of Vanilla Url to correct when users incorrectly enter the path to their discussion instead of the actual root of the forum.
    - Fixed a bug that caused Vanilla Admin JS & CSS to be included on all wp dashboard pages.
    - Fixed a bug that caused the copy of the embed template to fail and throw a fatal PHP error.
    - Added an option to the embed form that allows widgets to use the embed url instead of the actual forum url.
    - Changed discussions widget to friendly-url-encode discussion titles.
    - Fixed plugin to work with forums that are not using mod_rewrite.

    They did something to the code for servers without mod_rewrite enabled and that could be why your '?' is being converted into '&' after the disconnect? url.

    1.0.5
    - Fixed css & js includes so the containing folder is no longer hard-coded.
    - Added css file so Vanilla icon displays on all admin pages (not just when looking at a vanilla page).

    Bypassing the Vanilla Forums plugins as a test
    Doing it this way works if you just want to give users access to the forums and don't require the extra widgets.

    We should be able to rule out the Vanilla Forums embedded plugin by just adding the <script type="text/javascript" src="http://WORDPRESS/VANILLA/plugins/embedvanilla/remote.js"></script> as HTML into the editor box on any page. I tested this method and it also worked without any issue.

  9. DaveKennedy
    Member
    Posted 3 years ago #

    My WP is 3.3.1, Apache is 2.2.19, Vanilla is 2-0-18-1, WP Vanilla Connect is 1.1

    mod_rewrite is enabled on the server. I am using it to redirect from the root to the /wp folder, and thought that might be causing a problem. Have just tried resetting mod_rewrite and removing the redirect, but it doesn't make any difference to the Vanilla redirect failure.

    Tried the javascript, <script type="text/javascript" src="http://DOMAIN/wp/vanilla/plugins/embedvanilla/remote.js"></script> entered in html. The embed works fine but the redirect still results in Page Not Found.
    So that means the problem is with my setup, not the WP Vanilla Embed plugin.

    I think I will move my whole installation into the domain root. Not having it there has given problems with some plugins I'd like to use. That might take me a few days but I'll let you know what happens then.

    Anyway it sounds like you've proved that everything works correctly now with Vanilla embedded, which is very good news.

  10. nickiler
    Member
    Plugin Author

    Posted 3 years ago #

    They did something to the code for servers without mod_rewrite enabled and that could be why your '?' is being converted into '&' after the disconnect? url.

    Supposed to be, why your '?' is being converted into '&' after the jsConnect URL. - Auto spellcheck.

    Your server versions look good, so something fishy is going on. Keep me posted. I'll keep playing around with this embedded plugin :) Wanna try to add a shared cookie feature.

  11. DaveKennedy
    Member
    Posted 3 years ago #

    OK, putting an embedded forum on a Dreamhost site WP 3.3.1, WP Vanilla Connect 1.1 and Vanilla jcConnect 1.0.3b work perfectly together without making any change to the WP plugin code. This is without using the WP Vanilla Forums plugin; I'm simply putting the embed script from the '<embed> Vanilla' Vanilla plugin into a WP page.

    The problems I had with url redirect were something to do with my site url or mod_rewrite or maybe something else that I don't understand, but were clearly site-specific.

    Thanks for your help Nick, I'm marking this as Resolved.

  12. nickiler
    Member
    Plugin Author

    Posted 3 years ago #

    Very good Dave, glad you got it all up and going. I think the current embedded plugin can use an update for the latest WP3.0 features, but it leaves a market for someone willing to replace it.

    Anyway, glad in the end it all worked out. And now I have an embedded install with on my production server, so its a win-win.

    Take care Dave

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic