|
Date: 12/10/2007 5:41 pm · Subject: Some urls cause an asset to be inaccessible after creation/editing · Rating: -1
I was getting an error when trying to add an Article to a newly created Page Layout. After some digging I found that somehow the url of the page is stored in the database with a leading slash! This makes the asset impossible to be instantiated by WebGUI::Asset::newByUrl. It turns out the problem is in WebGUI::Asset::fixUrl. When the url (either posted directly or constructed by parent's url + menuTitle) is longer then 250 characters, the first 220 characters are stripped from the url. After that there's no check on leading slashes. To reproduce the problem: create a new Page Layout with the following url: abcdefghijklmnopqrstuvwyxz1234567890zxywvutsrqponmlkjihgfedcbaacegikmoqsuwyslkfajasdfmqwe32r09023849423klsadflkjfsdafjadfdasjfadslkfdajskfaslkj-kajsdlfjklfdasfdasmamk-moir4u8aslfdlk-asmklfjiofuq89jlkfasjlkjfadskljfadsmab/m./zxmc.mvliwjlkfjoiqfweuoi43998983229389243kfdskjfaskjfjksajkasfjkfdsajkfdasjkfadsjklfasjkjfkasjkfajkfadjkfdas Then try to add a new asset. WebGUI will complain that the requested page doesn't exists.
|