Troubleshooting

How do I fix the " _ERROR_COMMENT_LONGWORD" error?

Scenario:
"Some URLs are very long and if users post them in a comment on my blog, they sometimes get this "_ERROR_COMMENT_LONGWORD". How do I fix this problem?"

Solution:
This will require a small core hack. Open /nucleus/libs/COMMENTS.php and find the following code:
   // don't allow words that are too long<br />
        if (eregi('[a-zA-Z0-9|\.,;:!\?=\/\\]{90,90}',$comment['body']) != false)<br />
        return _ERROR_COMMENT_LONGWORD;

Change the number 90 to the maximum number of characters you want to allow.

Similarly, open /nucleus/libs/ADMIN.php and find this code:
		// intercept words that are too long<br />
		if (eregi("[a-zA-Z0-9|\.,;:!\?=\/\\]{90,90}",$body) != false)<br />
			$this->error(_ERROR_COMMENT_LONGWORD);

Again, change the number 90 to the maximum number of characters you want to allow.

Original forum thread (thanks, PakTrik & ftruscot!):
http://nucleuscms.org/forum/viewtopic.php?t=17939
section: Troubleshooting | submitted by Leng on 2008.Nov.16 | 8064 views

item rate
Total votes: 1 - Rating: 10.00

Please tell us how useful this answer was to you (0 = useless, 10 = very very helpful):

10