URLs on OCAL.org are absolute, but should be relative

Reported by Nathan Kinkade on 2012-01-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openclipart
High
Jakub Jankiewicz

Bug Description

It appears that URLs on OCAL are all absolute, but they really ought to be relative. One good reason for this was revealed just today when I installed an SSL cert on OCAL. You can now visit any page by manually entering https:// and the rest of the URL. However, on the encrypted page all links lead right back to non-encrypted pages. This is certainly not what a user would want or expect. The easy way around this is to make pretty much all URLs relative, in which case the browser the use the current protocol scheme, whatever that may be. Relative URLs are shorter and easier to maintain, and are more amenable to being moved around to other domains (like dev.OCAL.org, etc.).

As far as I can tell fixing this issue is going to just require a good deal of manual work by trudging through all the widgets and replacing absolute links with relative ones. This could perhaps be done programatically as well by writing a script that iterates over all widget content and automatically identifies and replaces absolute URL patters with relative ones. I don't know enough about Aiki to know how feasible this is at the moment.

Jakub Jankiewicz (jcubic) wrote :

This should be reported as AIKI bug, because in all places are [root] with is replaced by page url with is http://openclipar.org, os instead of url we should use host. On Ocal you can remove all [root] from urls.

Jakub Jankiewicz (jcubic) wrote :

I just report this bug in Aiki https://bugs.launchpad.net/aikiframework/+bug/911987 it's not the same as this one.

Changed in openclipart:
status: New → Confirmed
importance: Undecided → Low
Nathan Kinkade (nath) wrote :

I don't believe this is an Aiki bug. Can't you simply remove "[root]" from URLs on OCAL? Aiki doesn't insert "[root]" into the content pages, we do, and so we should be able to remove those parts to achieve relative URLs. Unless I'm wrong, you may want to unfile that Aiki bug and then redetermine the status of this one.

Jakub Jankiewicz (jcubic) wrote :

Yes in OCAL it can be fix by simply removing [root] but in AIKI this [root] should stay in urls and then if you use https urls should work, so I report this other bug.

Nathan Kinkade (nath) wrote :

Okay, good.... now I understand. Thanks for clarifying. I should have looked at the Aiki bug. In any case, for HTTPS to be of any use on OCAL, this ticket will need to be resolved, I imagine, unless Aiki can start making setting [root] to use the protocol of the current page. But I still feel that relative URLs are better in any case.

Roger, this is a good bug for you to fix since you rewrote part of that code.

Yes, best solution is to not use [root] for now. The problem is that
our new language code auto-writes language urls in new code depending
upon [route] for language url and [root] for absolute url. Aiki should
be doing the right thing by respecting urls.

Another option would be to have some construct for changing the
protocol of an absolute url

Jon

On Thu, Jan 5, 2012 at 6:04 AM, Nathan Kinkade <email address hidden> wrote:
> Okay, good.... now I understand.  Thanks for clarifying.  I should have
> looked at the Aiki bug.    In any case, for HTTPS to be of any use on
> OCAL, this ticket will need to be resolved, I imagine, unless Aiki can
> start making setting [root] to use the protocol of the current page.
> But I still feel that relative URLs are better in any case.
>
> --
> You received this bug notification because you are a member of
> openclipart.devel, which is subscribed to openclipart.
> https://bugs.launchpad.net/bugs/911966
>
> Title:
>  URLs on OCAL.org are absolute, but should be relative
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openclipart/+bug/911966/+subscriptions

--
Jon Phillips 王✳爻气 http://fabricatorz.com ✳ skype: kidproto ✳ irc: rejon
+1.415.830.3884 (global) ✳ +86-187-1003-9974 (beijing)

Changed in openclipart:
milestone: none → 3.1
assignee: nobody → Jakub Jankiewicz (jcubic)
rejon (rejon) wrote :

Need to fix this bug first and provide options before getting this fixed: https://bugs.launchpad.net/aikiframework/+bug/911987

Nathan Kinkade (nath) wrote :

I very much disagree that that Aiki bug needs to be fixed first. The solution here is to simply remove [root] from all URLs on OCAL, and in my view it's the right solution regardless of that other Aiki bug. We shouldn't have to write special code and do back bends just to achieve what a simple relative URL would give us. Let's work smart, not hard. Don't overengineer this thing and reinvent the wheel. There is a reason that relative URLs exist.

rejon (rejon) wrote :

Actually, I bring this up because I think it would be faster to fix
this in aiki than search and find all the urls in the code. I'm not
just making random decisions here. And, fixing it in aiki would fix it
for all aiki sites. So double win, plus, we need to update openclipart
too.

And, we have lived without https, but need an aiki software update
more than https at this point IMO.

Sooooo. Lets get another opinion, jakub you are deeper down in there
and brad too you have been, what do you think?

Jon

On Thu, Jan 5, 2012 at 10:09 PM, Nathan Kinkade <email address hidden> wrote:
> I very much disagree that that Aiki bug needs to be fixed first.  The
> solution here is to simply remove [root] from all URLs on OCAL, and in
> my view it's the right solution regardless of that other Aiki bug.  We
> shouldn't have to write special code and do back bends just to achieve
> what a simple relative URL would give us.  Let's work smart, not hard.
> Don't overengineer this thing and reinvent the wheel.  There is a reason
> that relative URLs exist.
>
> --
> You received this bug notification because you are a member of
> openclipart.devel, which is subscribed to openclipart.
> https://bugs.launchpad.net/bugs/911966
>
> Title:
>  URLs on OCAL.org are absolute, but should be relative
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openclipart/+bug/911966/+subscriptions

--
Jon Phillips 王✳爻气 http://fabricatorz.com ✳ skype: kidproto ✳ irc: rejon
+1.415.830.3884 (global) ✳ +86-187-1003-9974 (beijing)

Jakub Jankiewicz (jcubic) wrote :

I agree with Nathan, we can remove [root] from OCAL right now. So this bug will be fixed before we upgrade Aiki on OCAL, and it will take a while to fix this in Aiki because there are other bugs to fix. In Aiki it can be fixed with version 0.9.1. Is just the same as delete file on clipart delete, we will have it in Aiki but in OCAL it's fixed, since there is extension that deletes the old file.

Nathan Kinkade (nath) wrote :

A good start on the OCAL site is to quickly change the header/footer links, links on the home page body and links on search results. That should cover about 95% of what most people click, and only take about 10 minutes or less to do. Then, as we have time and/or come across the others, we can fix them incrementally.

rejon (rejon) wrote :

Ok, great. Glad to get opinions then :) Jakub, can you make the
changes please and keep us posted on the status please.

I honestly never liked the [root] urls. Roger, btw, do you have a
solution for a short syntax for constructing relative language urls in
aiki? I'm filing in a separate bug.

On Fri, Jan 6, 2012 at 6:28 AM, Nathan Kinkade <email address hidden> wrote:
> A good start on the OCAL site is to quickly change the header/footer
> links, links on the home page body and links on search results.  That
> should cover about 95% of what most people click, and only take about 10
> minutes or less to do.  Then, as we have time and/or come across the
> others, we can fix them incrementally.
>
> --
> You received this bug notification because you are a member of
> openclipart.devel, which is subscribed to openclipart.
> https://bugs.launchpad.net/bugs/911966
>
> Title:
>  URLs on OCAL.org are absolute, but should be relative
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openclipart/+bug/911966/+subscriptions

--
Jon Phillips 王✳爻气 http://fabricatorz.com ✳ skype: kidproto ✳ irc: rejon
+1.415.830.3884 (global) ✳ +86-187-1003-9974 (beijing)

Changed in openclipart:
importance: Low → High
Changed in openclipart:
status: Confirmed → In Progress
Jakub Jankiewicz (jcubic) wrote :

I remove all [root] on the site using mysql console.

Changed in openclipart:
status: In Progress → Fix Committed
Nathan Kinkade (nath) wrote :

Nice. I just clicked around and everything seems to work just fine. Marking this one as "Fix Released", which I guess means it's closed.

Changed in openclipart:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers