I am using 0.9.6.1 (rev 3118), the latest stable download. Not that this is that big of a deal, but I am trying to confirm if this is a bug. If you create a Weblink and have the Weblink set to an inavlid URL, you end up getting a parse error.
Check this link out for an example:
http://www.blueskyvineyard.com/not-a-good-link
Jesse R.
Consider trying something new and extraordinary.
Illinois Wine
Have you considered donating to MODx lately?
Donate now. Every contribution helps.
Quote from: Jesse at Dec 23, 2007, 09:13 PM
I am using 0.9.6.1 (rev 3118), the latest stable download. Not that this is that big of a deal, but I am trying to confirm if this is a bug. If you create a Weblink and have the Weblink set to an inavlid URL, you end up getting a parse error.
Check this link out for an example:
http://www.blueskyvineyard.com/not-a-good-link
It’s the dashes.
http://www.blueskyvineyard.com/notagoodlink
leads to your page-not-found page. Your original link is a valid URL so I think it is a bug. It doesn’t seem to happen in 0.9.6.
Bob
The document specified does not exist. There is no document stored at that location nor a real directory in the file structure, so it can’t be a snippet. To provide a little more context, I am moving away from my oscommerce store which was stored in the public_html/store folder. Now that I no longer want it used, I renamed the directory to store-old, but in the weblink I put storeold, which actually didn’t exist anywhere. When I went to the alias of the weblink I got the parse error, but as soon as I changed it to store-old, it worked as expected. Any other ideas?
Jesse R.
Consider trying something new and extraordinary.
Illinois Wine
Have you considered donating to MODx lately?
Donate now. Every contribution helps.
-
MODX Staff
- 10,725 Posts
It’s simply some snippet calling preg_match() incorrectly (with an unknown preg modifier, a) on your error_page.
Thanks Jason. I found the culprit. It was the Dynamic search created by nimja that tries to take the bad URL and send it to AjaxSearch for possible results. The code for the Dynamic Search snippet is:
<?php
//Very VERY simple call to set the right POST value for AjaxSearch.
if (!empty($_GET['q']) && empty($_GET['AS_search'])) {
$_POST['search'] = urldecode($_GET['q']);
return "<h2>Maybe these may help...</h2>";
} else {
return null;
}
?>
Since it doesn’t do a preg_match(), I imagine it is sending data to AjaxSearch that AjaxSearch doesn’t know how to account for, or can’t account for given the method used. What is strange to me, but maybe not strange at all, is if I go to
http://www.blueskyvineyard.com/bad-link or
http://www.blueskyvineyard.com/ANY-NON-VALID/LINK-HERE, which are not Weblinks that redirect, I cannot get the error to fire off. However, if it is a Weblink that redirects to something that doesn’t exist, the error fires off.
Feel free to move this thread out of Core Code.
Jesse R.
Consider trying something new and extraordinary.
Illinois Wine
Have you considered donating to MODx lately?
Donate now. Every contribution helps.