I've had this problem for a while, and I've noticed a lot of other people with it as well, particularly when using WYSIWYG editors:
When adding a story, the error "Short story must contain a value!" pops up even when you've entered something, yet the second time you click, it works just fine.
The workaround:
As simple as can be, this stops cutenewsru from checking if the short story is empty. The WYSIWYG editors work perfectly when submitting the article, but the first time around the code which checks that the field isn't empty is unable to recognise the WYSIWYG editor's content, so it returns false.
This is more of a workaround than a bug fix - all it does is simply removes the check for short story (the content you've written in the short story field still works just fine; it's failing to check that there field is filled in which causes the error). In other words, cutenews will no longer check if Short Story is empty, but the text you entered will make it into the database just fine!
How to do it:
In skins/cute.js find:
- Code: Select all
if ((
elem.name == "short_story"
|| elem.name == "poster"
|| elem.name == "comment"
|| elem.name == "username"
|| elem.name == "password"
|| elem.name == "regusername"
|| elem.name == "regpassword"
)
&& elem.value==''
)
And replace it with:
- Code: Select all
if ((
elem.name == "poster"
|| elem.name == "comment"
|| elem.name == "username"
|| elem.name == "password"
|| elem.name == "regusername"
|| elem.name == "regpassword"
)
&& elem.value==''
)
And that's it! Simple as that.
The disadvantage:
Once you have made this modification, it will become possible for users to submit an article with the short story empty. If you have writers or clients using your cutenewsru you will need to explain to them that the short story must be filled in case anybody accidentally submits an article without a short story and you haven't set it to go through admin approval.
