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.

Wonky URLs

Many moons ago I set up Vanilla 2.1.1 on a hosted site that was in development and I soon want to go live with it. In order to get it ready I decided I needed to update to the latest version. Rather than apply that straight to the main site I thought I would bring up a copy on a dev machine and run through things there first.

The original site is running IIS so I brought up a Windows box, installed IIS Express and MySQL and copied things over. After a bit of a battle with IIS Rewrite things mainly look OK now but I have an issue with the URLs being created for categories and posts. My site is currently running on http://localhost:14960/forums but instead of returning this so me things (e.g. CategoryUrl($Category)) double up on the port so I end up with http://localhost:14960:14960/forums. Does anyone know where I need to look to try and resolve this?

Comments

  • RiverRiver MVP
    edited November 2016

    You posted in vanilla 2.1 and earlier category. Are you talking about the latest version of 2.1.x or are you talking about vanilla 2.3, or are you talking about the latest version on github. If you have a question about vanilla 2.3 - you get the best answers if you post your questions in the vanilla 2.3 category.

    regarding ports - look in your config.php and whatever rewrite rules you use and determine what statements may be port related.

    The cleanest upgrade might be via. if your site is embedded, unembed and test.
    It might be easier to create a new vanilla 2.3 forum, make sure rewrite url's work and are set. Upload some pics and use advanced editor. if it works in IIS, then go about dumping (exporting) the old sql database from 2.1 and importing into the vanilla 2.3 database. Leave the config.php from 2.3. Run utility/update and utility/structure, delete the ini files in cache. Run through the dashboard settings, permissions, registration, etc via dashboard. Enable any plugins you want and change to whatever theme you want.

    You might install on linux system instead, things run cleaner and easier and less problem prone for most admin.

    Many moons ago I set up Vanilla 2.1.1 on a hosted site that was in development and I soon want to go live with it.

    The original site is running IIS so I brought up a Windows box, installed IIS Express and MySQL and copied things over.

    i
    t is unclear from your discussion, what you are doing, did you upgrade, what version, can you use linux instead, you would have an easier time, since there is more testing on linux and from looking at discussions on forums, many people have problems with IIS.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • RiverRiver MVP
    edited November 2016

    @alan0209 said:
    Many moons ago I set up Vanilla 2.1.1 on a hosted site that was in development and I soon want to go live with it. In order to get it ready I decided I needed to update to the latest version. Rather than apply that straight to the main site I thought I would bring up a copy on a dev machine and run through things there first.

    The original site is running IIS so I brought up a Windows box, installed IIS Express and MySQL and copied things over. After a bit of a battle with IIS Rewrite things mainly look OK now but I have an issue with the URLs being created for categories and posts. My site is currently running on http://localhost:14960/forums but instead of returning this so me things (e.g. CategoryUrl($Category)) double up on the port so I end up with http://localhost:14960:14960/forums. Does anyone know where I need to look to try and resolve this?

    regarding 2.1.1 https://vanillaforums.org/discussion/26840/vanilla-is-duplicating-the-port-number

    https://vanillaforums.org/discussion/27568/enabling-clean-urls-on-iis-installations

    is your site embedded by any chance.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • AH great stuff, thanks River. I'm sorry I wasn't very clear. My live site is running 2.1.1 which is what I have installed on the dev platform as i wan't to test the upgrade process once I have it all working under 2.1.1.

    I have just tracked it down to the following function in class.request.php

    public function Host($Hostname = NULL) {
    return $this->RequestHost($Hostname);
    }

    The code seemed to expect a host without port here and so added the port after but the code is actually already returning host+port.

    I see from the link you found that this was a known bug in 2.1.1. I have just commented out the section that adds the port to the end for now and everything seems to be working fine. Now I can test upgrading from 2.1.1 to the latest version.

    Thanks again

    Alan

Sign In or Register to comment.