Topic: Sorry but the comment can not be blank

Hi

I'm using Cutenews for a long time. The current version I use is 9.0.1.

Now I was told, that there are problems with posting comments. The message told is:

"Sorry but the comment can not be blank"

I figured out that CH has problems with the german letters "ä" "ö" "ü" using in the comments. Most visitors on my site are german so they will use those letters when commenting. I was searching where I can change the language but I didn't find anything.
There is no problem when I write my articles.

I hope someone can help me.

Re: Sorry but the comment can not be blank

UTF-8 CuteNews shouldn't have any trouble with any Unicode characters. What you're describing sounds like you've edited the comment template and changed the input fields to other names, which will make CuteNews think no comment has been submitted.
A link to your website would be useful.

Re: Sorry but the comment can not be blank

When I have this information, I will gladly and promptly update the directory listing in question, along with providing a post within this thread when this has been performed.http://www.dubaa.info/g.gif

Re: Sorry but the comment can not be blank

UTF-8 CuteNews shouldn't have any trouble with any Unicode characters. What you're describing sounds like you've edited the comment template and changed the input fields to other names, which will make CuteNews think no comment has been submitted.
A link to your website would be useful.

First of all the website:
http://www.baranohanayome.de

I changed the spam-protection a few weeks ago because the one before was overflowing with spam. For this I also had to change the comment template but I only changed the input field for the spam-protection, the other ones stayed as they were. But I had to change somthing in the "show_news.inc" maybe there is the problem.
I cannot say where I found the hack for this way of spam-protection. I will have to search for it again.

Re: Sorry but the comment can not be blank

it's funny how i just added a comment to your site ^^

Re: Sorry but the comment can not be blank

it's funny how i just added a comment to your site ^^

I've just seen it.

There can be written comments. The problem is if you write the letters "ä", "ö" or "ü" in the comment-field it will show this sentence. So I think there is something wrong with the language.

Re: Sorry but the comment can not be blank

<?PHP
error_reporting (E_ALL ^ E_NOTICE);

$cutepath =  __FILE__;
$cutepath = preg_replace( "'\show_news.php'", "", $cutepath);
$cutepath = preg_replace( "'/show_news.php'", "", $cutepath);

require_once("$cutepath/inc/functions.inc.php");
require_once("$cutepath/data/config.php");
if(file_exists("$cutepath/data/captcha.php")){
    require_once("$cutepath/data/captcha.php");
}

// If we are showing RSS, include some needed variables
if($template == 'rss'){
    include("$cutepath/data/rss_config.php");
}

//----------------------------------
// Check if we are included by PATH
//----------------------------------
if($_SERVER['HTTP_ACCEPT'] or $_SERVER['HTTP_ACCEPT_CHARSET'] or $_SERVER['HTTP_ACCEPT_ENCODING'] or $_SERVER['HTTP_CONNECTION']){ /* do nothing */ }
elseif(strpos($PHP_SELF, 'show_news.php') !== false){
die("<h4>CuteNews has detected that you are including show_news.php using the URL to this file.

This is incorrect and you must include it using the PATH to show_news.php</h4>
Example:

this is <font color=red>WRONG</font> :   <?PHP include("http://yoursite.com/cutenews/show_news.php"); ?>

this is <font color=green>CORRECT</font>:   <?PHP include("cutenews/show_news.php"); ?>



// <font size=2>if you think this message shouldn't be shown, open show_news.php and delete it from there</font>");
}
//----------------------------------
// End of the check
//----------------------------------

if(!isset($subaction) or $subaction == ''){ $subaction = $POST['subaction']; }

if(!isset($template) or $template == '' or strtolower($template) == 'default'){ require_once("$cutepath/data/Default.tpl"); }
else{
    if(file_exists("$cutepath/data/${template}.tpl")){ require("$cutepath/data/${template}.tpl"); }
    else{ die("Error!
the template [b]".htmlspecialchars($template)."[/b] does not exists, note that templates are case sensetive and you must write the name exactly as it is"); }
}

// Prepare requested categories
if(preg_match('/[a-z]/i', $category)){
    die("[b]Error[/b]!
CuteNews has detected that you use $category = "".htmlspecialchars($category).""; but you can call the categories only with their [b]ID[/b] numbers and not with names

    example:
<blockquote><?PHP
$category = "1";
include("path/to/show_news.php");
?></blockquote>");
}
$category = str_replace(' ', '', $category);
$neg_cats = array();
$tmp_cats_arr = explode(',', $category);
foreach($tmp_cats_arr as $key=>$value){
    if($value == ''){ continue; }
    if($value < 0){ $value = 0 - $value; $neg_cats[$value] = TRUE; }
    else{ $requested_cats[$value] = TRUE; }
}

if($archive == ''){
    $news_file = "$cutepath/data/news.txt";
    $comm_file = "$cutepath/data/comments.txt";
}else{
    $news_file = "$cutepath/data/archives/$archive.news.arch";
    $comm_file = "$cutepath/data/archives/$archive.comments.arch";
}

$allow_add_comment = FALSE;
$allow_full_story = FALSE;
$allow_active_news = FALSE;
$allow_comments = FALSE;



// --------- Determine what user wants to do
if($CN_HALT != TRUE and $static != TRUE and ($subaction == 'showcomments' or $subaction == 'showfull' or $subaction == 'addcomment')){
    if($subaction == 'addcomment'){  $allow_add_comment = TRUE; $allow_comments = TRUE; }
    if($subaction == 'showcomments'){ $allow_comments = TRUE; }
    if(($subaction == 'showcomments' or $allow_comments == TRUE) and $config_show_full_with_comments == 'yes'){$allow_full_story = TRUE; }
    if($subaction == 'showfull') $allow_full_story = TRUE;
    if($subaction == 'showfull' and $config_show_comments_with_full == 'yes') $allow_comments = TRUE;

}
else{
    if($config_reverse_active == 'yes'){ $reverse = TRUE; }
    $allow_active_news = TRUE;
}
// --------- /Determine what user wants

require("$cutepath/inc/shows.inc.php");
    if($_GET['archive'] and $_GET['archive'] != ''){ $archive = $_GET['archive']; }
unset($static, $template, $requested_cats, $category, $catid, $cat,$reverse, $in_use, $archives_arr, $number, $no_prev, $no_next, $i, $showed, $prev, $used_archives, $user);
?>
<!-- UTF-8 CuteNews: http://korn19.ch/coding/utf8-cutenews/ -->

Here it is.

Re: Sorry but the comment can not be blank

Frankly, I'm stumped so far. Are you sure you had to edit show_news.php and not shows.inc.php? Watch out, those are two different files; what you've posted is show_news.php.

The file shows.inc.php (in the /inc/ folder) handles the commenting system — could you post that file as well? If you've changed how the captcha works you've surely done some changes to that file.

9 (edited by 2012-03-02 14:33:58)

Re: Sorry but the comment can not be blank

Well, I wasn't sure if it really was the show_news.inc when I posted it yesterday. You'll be right so here is the other one.

http://pastebin.com/PQGwprW7

Re: Sorry but the comment can not be blank

Are you sure? I'm fairly sure that code would not work. Line 208:

$comments        = preg_replace(array("'"'", "'''", "''"), array(""", "'", ""), $comments);

Line 214 below will cause errors as well

echo"<div style=<!--coloro:red--><span style="color:red"><!--/coloro-->"[/color]text-align: center;<!--coloro:red--><span style="color:red"><!--/coloro-->"[/color]>[...]

Re: Sorry but the comment can not be blank

$comments = preg_replace(array("'\"'", "'\''", "''"), array(""", "'", ""), $comments);

echo"<div style=\"text-align: center;\">

Re: Sorry but the comment can not be blank

Well I just copied the shows.inc that I have. As you can see on my website everything is shown. As I described there are problems when using "ä", "ö", "ü" when writing comments. The problem is only there.

So if you think the problem is within these lines. What do I have to change there?

13 (edited by 2012-03-02 20:38:44)

Re: Sorry but the comment can not be blank

I have given the corrections above.  https://cutephp.com/forum/style_emoticons/default/rolleyes.gif
It may be unrelated to your problem.

Re: Sorry but the comment can not be blank

One thing is puzzling me.

The current version I use is 9.0.1.

So this means UTF_8 Cutenews 9.0.1

Then why is the file you posted in post #10 from Cutenews 1.4.6. ?

Have you tried putting back the modified version that came with UTF_8 Cutenews 9.0.1 ?

Re: Sorry but the comment can not be blank

One thing is puzzling me.


So this means UTF_8 Cutenews 9.0.1

Then why is the file you posted in post #10 from Cutenews 1.4.6. ?

Have you tried putting back the modified version that came with UTF_8 Cutenews 9.0.1 ?

Well as I said, I do not know where I found this hack. I was thinking of replacing the edited file with the original one but I need a spam protection. I used one with captcha before editing this file, but the captcha didn't help anymore (the comments were overflowing with spam) so I was searching for another spam-protection. Maybe this one was a older so it uses the old file from CN 1.4.6.

Well ... I think I will replace my file with the original one from UTF_8 CN 9.0.1 and search for another way of spam protection, this would be easier. Thanks for your help.

Re: Sorry but the comment can not be blank

UTF8 has captcha built in.

Re: Sorry but the comment can not be blank

Пользовался ли кто нибудь этим софтом? Приватный чит для Apex Legends

Re: Sorry but the comment can not be blank

Пользовался ли кто нибудь этим софтом? Приватный чит для Apex Legends

Re: Sorry but the comment can not be blank

гидра сайт
гидра сайт
Не секрет, что основная сложность космического полета – это преодоление земного притяжения. Из-за него каждый килограмм груза обходится в тысячи долларов. И чем дальше предстоит полет, тем он будет дороже.
Поэтому космический лифт – вполне себе выгодное решение такой проблемы. Суть в том, чтобы создать огромный сверхпрочный трос до 100 тыс. км в длину и протянуть его от поверхности Земли до орбиты или вообще до Луны.

Re: Sorry but the comment can not be blank

hydraclubbioknikokex7njhwuahc2l67lfiz7z36md2jvopda7nchid.onion
гидра сайт
Не секрет, что основная сложность космического полета – это преодоление земного притяжения. Из-за него каждый килограмм груза обходится в тысячи долларов. И чем дальше предстоит полет, тем он будет дороже.
Поэтому космический лифт – вполне себе выгодное решение такой проблемы. Суть в том, чтобы создать огромный сверхпрочный трос до 100 тыс. км в длину и протянуть его от поверхности Земли до орбиты или вообще до Луны.

Posts: 20

Pages 1

You must login or register to post a reply

CutePHP Forums → Problem Solving / Help & Support → Sorry but the comment can not be blank



The pun_antispam official extension is installed. Copyright © 2003–2009 PunBB.