Base URL trailing slash /

So when did RW stop automatically adding a trailing slash after the base url, even if the user did not add it himself?

7.1 latest beta - Bug? Feature? Something else?

Breaks a couple of my stacks that I use the url to build a path. I can get round it by looking for the slash in my php. Just thought I mention it in case you were not aware you’d stopped adding that slash automatically.

Edit: Probably an older bug (see my next post down).

I am not seeing this behaviour in Version 7.1.0 (18282b)

When adding in that input field and navigating into another field, or pressing tab, the web address will be completed automatically to

@instacks Yeah. I just tried to do it in a new project and latest 7.1 does not allow the base url not to have a trailing slash when entering a new one. But at some point in our recent history that trailing slash was either never enforced or removed at some stage, because dealing with support for a customer just now, I tried to replicate their issue in my test site. When I discovered my stack was failing for me also and why, I looked at my own base url in my project file and it had no trailing slash. adding it fixed the issue for both me and my customer.

So… It works today… it worked last time I payed any attention to this, but we should be aware they are projects out there that do not have a trailing slash (somehow or other).

1 Like

I have seen this with some customers projects. It would be nice if RapidWeaver enforced always adding a trailing slash at the end of the URL.

Hmm, this behaviour has not changes as far as I’m aware - we always add a trailing slash in the site setup.

FYI I created that project file (seen in my screen grab above) from scratch when ever foundry theme came out (not long ago, maybe 6 weeks). As noted in my post above, when I investigated my own base url there was no trailing slash. Once I have added it back to the end of the url, now using the latest 7.1, there is no way I can not have it there. If I try and delete it RW rightly will not let me. How it disappeared, if it was there when I created the project I have no idea. But I know I’m not alone in having a project file without that trailing slash, because my customer also confirmed his was missing, and adding it back allowed my stack to work straight away.

I reported this some while ago to Nik. The behaviour changed for some 6.x release and between the web address URL in project settings and the modal window that used to appear asking for web address when saving a new project with no web address set. The latter method allowed to enter a web address with no trailing slash.

Although this has been fixed in most recent 6.x releases, AFAIK some migrated 6.x projects can still contain a web address with no trailing slash. Long story short, don’t rely on trailing slash to parse it.

Sorry, I was just referring to 7.x - also you should never assume Rapidweaver will give you something, as we’ve seen things do change and users do odd things.

Best to code defensively, and handle errors with grace.