PDA

View Full Version : WordPress issue, some hyperlinks cannot be created



[XC] Oj101
08-31-2011, 03:07 AM
Here's what I posted on their forums:


I run the site xxx and since this evening I've noticed that at times I can no longer post hyperlinks. I wrote up an article, hit preview and noticed that it was stuck on saving preview. I hit publish and got a 404 error.

Swapping from Opera to Internet Explorer, I was able to post the article by copy-pasting it from Opera. Trying to make any changes once again resulted in a 404 error. Thinking that it was just the edit function which was broken, I deleted the page but could not recreate it without once again getting a 404 error.

A sample link I tried to use was <a href="http://www.crucial.com/support/firmware.aspx">Test link</a>, as the URL is needed in an article. If I try to put the line of code in a different article it works perfectly fine, but in the article that needs the link it doesn't work.

I tried to recreate the article AGAIN, and now links which were working bring up a 404 error when clicking publish and this particular link works. I've played around with the .htaccess file as some have suggested, but to no avail. Please forgive my spelling, it's going on for 1:00AM and I have been working on this for the last five hours.

The changes I've done to .htaccess (in the root folder):

<IfModule mod_security.c>
SecFilterEngine off
</IfModule>

<IfModule mod_security.c>
SecFilterInheritance Off
</IfModule>

I also tried the following:

SecFilterScanPOST Off
SecFilterEngine Off

<IfModule mod_security.c>
SecFilterEngine off
</IfModule>

<IfModule mod_security.c>
SecFilterInheritance Off
</IfModule>
but that resulted in any page lookup returning a 500 error.

TL;DR: Sometimes, clicking publish on a page which has a hyperlink results in a 404 error; yet other times that EXACT same link will work on another page. Editing .htaccess didn't work.

Addendum: I run the following plug-ins for WP -

JR Favicon for WordPress
Meta SEO Pack
post-views
Post Page Associator
WordPress Hit Counter

I run the Arras theme

I've reverted my .htaccess file and it looks like this


And lastly, I just tried:


<a href="">Test link</a>

and even that gives

Error 404 - Not Found

We're very sorry, but that page doesn't exist or has been moved.
Please make sure you have the right URL.

If you still can't find what you're looking for, try using the search form below.

Here's what I sent my ISP:


Hi there

Please either turn off ModSecurity on xxx or add the domain to the white list, I can no longer make posts in WordPress which use HTML. A bit of research has led me to believe that the ModSecurity module is to blame.

This is urgent, I lose revenue while offline.

Thanks
J******


I can't include a hyperlink to " http://www.crucial.com/support/firmware.aspx " without getting a 404 error on http://flyingsuicide.net/wp-admin/post.php yet a link to " http://thessdreview.com/latest-buzz/crucial-m4-ssd-firmware-update-0009-posted-tests-display-definite-performance-increase/ " works fine. Many links I've created before still work but cannot be recreated


Here's a link if needed http://wordpress.org/support/topic/disable-mod-security

Note the following must be added to whitelist.conf in the /usr/local/apache/conf/modsec2/ directory (not visible from the CPanel File Manager) :


<LocationMatch "/wp-admin/post.php">
SecRuleRemoveById 300015 300016 300017
</LocationMatch>

<LocationMatch "/wp-admin/admin-ajax.php">
SecRuleRemoveById 300015 300016 300017
</LocationMatch>

<LocationMatch "/wp-admin/page.php">
SecRuleRemoveById 300015 300016 300017
</LocationMatch>


Good Day,

Thank you for your email.

The rules have been added as requested.

If you have any further queries please feel free to contact us again.


-- R***** W*****


Hi R*****,

I still cannot make entries containing certain hyperlinks, has Apache been restarted since the change was done?

Thanks


Good Day,

Thank you for your email.

Please can you send me a screen shot of the error along with login details and steps to re-create the error so that I can investigate further.

Awaiting feedback.


-- R***** W*****


Hi R*****

1-working is a picture of a post which can be made successfully, the highlighted hyperlink works without an issue so it's not just links in general
2-notworking is a picture of a hyperlink added, the cause of the issue. The hyperlink doesn't point anywhere, any link in that location causes the issue
3-result is what I get after trying to upload the modified post

Copy pasting the working hyperlink in the first image to the end of the post also causes the issue to occur, which is odd. The file not found, " xxx/wp-admin/post.php " , is definitely in the correct location, and is verified as working by the post uploading without the hyperlink in place.

This issue first occurred last night (Monday) at around 21:00, on Sunday it was still working fine.

Login details are as follow:

cpanel:
REMOVED

WordPress Admin area:
REMOVED

Many thanks
J*******

That takes us to now, see attached screenshots for the last message, arranged from 1-working to 3-result

119545

119546

119547

[XC] Oj101
08-31-2011, 07:05 AM
Sorted, the hosting company changed another ModSecurity rule and everything's working :)