Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorsuthern
     

    I've found what may be a bug (heh), and a work around (that looks ugly in the URI).

    When I try to pass something like 'Computer & Office Equiptment' in the URL (like this /part/edit_accounts/Inventory/asset/Computer+%26+Office+Equipment/), Akelos splits it up into two params, like this

    [controller] => part
    [action] => edit_accounts
    [ak] => part/edit_accounts/Inventory/asset/Computer 
    [Office_Equipment/] => 
    [AK_023957] => d3be5eba4048afb75ba4100435cd03f8
    [lang] => en
    [category] => Inventory
    [account_type] => asset
    [account_name] => Computer 
    

    I've found a way around it by calling urlencode TWICE, making the URL look like this:

    /part/edit_accounts/Inventory/asset/Computer%2B%2526%2BOffice%2BEquipment/
    

    I now get the right params, but it looks downright ugly. Is this a bug? Perhaps a 'undocumented feature'? ;-) I can live with it the way it is, but thought perhaps someone else would enjoy a heads up about passing symbols like "/" and "&" through the URL.

    •  
      CommentAuthorriffed
     

    Probaly best to write a helper to encode the address. I'm guessing not a bug but not a feature either.

    • CommentAuthorsuthern
     

    Indeed. I've modified my helper so it encodes it twice. Not hard, just had me scratching my head for a few mins. Carry on!

    • CommentAuthorKaste
     

    Can it be that %26 = & gets eaten before akelos handles the request? apache? .htaccess?

    • CommentAuthorsuthern
     

    Not only %26, but &#47 = '/' too. I don't know where it vanishes, 'double encoding' works for now.

    • CommentAuthorKaste
     

    yes, but a slash is a slash and will always be interpreted as limiter by the Router. The & comes into play after an ?, to chain so to speak. I'm sure the Router is an ampersand-ignoramus.

    • CommentAuthorsuthern
     

    Ok, now that I've upgraded to the latest revision (508), double encoding no longer works. A slash is once again interpreted as a limiter by the Router.

    Other than using a SESSION variable, how could I 'keep' the variable (with the slash in it) between page refreshes?

    •  
      CommentAuthorbermi
     

    suthern, on revision 509, I have fixed the URL encoding bug. Thanks for reporting.

    • CommentAuthorsuthern
     
    Thanks Bermi! I should have put a bug report in for it. I've switched to using the id of a record rather than the name, so slashes are not an issue. The real bug is in QuickBooks. It should not allow slashes in it's names. heh.