You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by richiebaby <ri...@logica.com> on 2008/04/02 17:39:11 UTC
FreeMarker template error! when managing comments
Hi,
I have quite a serious bug with my live Roller installation. I am using
Roller V4.0.
The problem occurs when you are viewing the comments for a weblog (Create &
Edit --> Comments).
The first 11 or so comments display fine and you see the checkboxes that
allow you to mark as 'approved, spam or delete'. Then there is a comment
that appears to break and what you see is the same error message printed 3
times - it looks as though there is one error for each check box column.
Here is the beginning of the stack trace:
Error on line 11, column 13 in template/simple/checkboxlist.ftl
stack.findString(parameters.listValue) is undefined.
It cannot be assigned to itemValue
The problematic instruction:
----------
==> assignment: itemValue=stack.findString(parameters.listValue) [on line
11, column 13 in template/simple/checkboxlist.ftl]
in user-directive s.iterator [on line 3, column 5 in
template/simple/checkboxlist.ftl]
----------
Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Error on line 11, column 13 in
template/simple/checkboxlist.ftl
stack.findString(parameters.listValue) is undefined.
It cannot be assigned to itemValue
at freemarker.core.Assignment.accept(Assignment.java:111)
I have attached the full error:
http://www.nabble.com/file/p16447315/bug.txt.txt bug.txt.txt
All assistance is much appreciated.
Thanks for reading
--
View this message in context: http://www.nabble.com/FreeMarker-template-error%21-when-managing-comments-tp16447315s12275p16447315.html
Sent from the Roller - Dev mailing list archive at Nabble.com.
Re: FreeMarker template error! - PROBLEM FOUND.
Posted by richiebaby <ri...@logica.com>.
Dave Johnson-8 wrote:
>
> On Thu, Apr 3, 2008 at 6:08 AM, richiebaby <ri...@logica.com> wrote:
>>
>> PROBLEM FOUND! Is it a Roller bug?
>>
>> I have been able to replicate the issue on my development installation
>> by
>> simply posting a comment to a weblog entry whilst leaving the Name field
>> blank.
>>
>> When inspecting the comment management page that lists all of the
>> comments,
>> I can see that the 'Posted by' field is being set to "User from IP
>> address
>> XX.XXX.XXX.X". This seems to be a default Roller functionality because
>> in
>> the database (within the ROLLER_COMMENT table) I can see a value of
>> <NULL>
>> within the NAME field for that comment.
>>
>> Therefore I still have 3 questions:
>>
>> Is this a known bug, is there a fix?
>>
>> Is it possible to force the Name field to be mandatory when posting a
>> comment?
>>
>> Can I perform direct sequel on the ROLLER_COMMENT table to replace the
>> <NULL> value with the text "Guest", for example?
>
> I cannot reproduce the problem. When I leave the name field blank,
> things work fine in the comment management page. What is your
> environment?
>
> # What version of Roller are you using? If you are building from
> sources, on which branch are you building?
> # What Application Server version are you using?
> # What database are you using?
> # What Java version are you using?
> # What operating system are you using?
>
>
> - Dave
>
>
Hi,
Thanks for reading. I have seen the issue on both my development server and
my clustered live servers.
I didn't perform the installations so if more info is needed, please ask and
I will find out - In response to your questions:
With respect to DEV
-------------------
# What version of Roller are you using? If you are building from sources, on
which branch are you building?
V4.0 (apache-roller-4.0-rc2.zip)
# What Application Server version are you using?
Tomcat 5.5.23
# What database are you using?
Oracle 10g 10.2.0.3.0
# What Java version are you using?
jdk1.5.0_11
# What operating system are you using?
Microsoft Windows Server 2003
Enterprise Edition
Service Pack 1
With respect to LIVE
--------------------
# What version of Roller are you using? If you are building from sources, on
which branch are you building?
V4.0 (apache-roller-4.0.zip)
# What Application Server version are you using?
Tomcat 5.5.23
# What database are you using?
Oracle 10g 10.2.0.3.0
# What Java version are you using?
jdk1.5.0_11
# What operating system are you using?
Microsoft Windows Server 2003
Enterprise Edition
Service Pack 2
As a temp fix I have updated weblog.vm (\WEB-INF\velocity\weblog.vm) to not
allow the user
to submit a comment with the name field blank.
function validateComments(theForm) {
//Additional validation added to stop null values being written to
//the database for an empty name field
if (theForm.name.value == "") {
alert("$text.get( "Please enter a name" )");
theForm.name.focus();
return false;
}
else if (theForm.content.value == "") {
alert("$text.get( "macro.weblog.commentwarning" )");
theForm.content.focus();
return false;
}
}
--
View this message in context: http://www.nabble.com/Subject-changed%3A-Possible-Roller-bug---Users-can-post-comments-without-supplying-a-name%21-tp16447315s12275p16833367.html
Sent from the Roller - Dev mailing list archive at Nabble.com.
Re: FreeMarker template error! - PROBLEM FOUND.
Posted by Dave <sn...@gmail.com>.
On Thu, Apr 3, 2008 at 6:08 AM, richiebaby <ri...@logica.com> wrote:
>
> PROBLEM FOUND! Is it a Roller bug?
>
> I have been able to replicate the issue on my development installation by
> simply posting a comment to a weblog entry whilst leaving the Name field
> blank.
>
> When inspecting the comment management page that lists all of the comments,
> I can see that the 'Posted by' field is being set to "User from IP address
> XX.XXX.XXX.X". This seems to be a default Roller functionality because in
> the database (within the ROLLER_COMMENT table) I can see a value of <NULL>
> within the NAME field for that comment.
>
> Therefore I still have 3 questions:
>
> Is this a known bug, is there a fix?
>
> Is it possible to force the Name field to be mandatory when posting a
> comment?
>
> Can I perform direct sequel on the ROLLER_COMMENT table to replace the
> <NULL> value with the text "Guest", for example?
I cannot reproduce the problem. When I leave the name field blank,
things work fine in the comment management page. What is your
environment?
# What version of Roller are you using? If you are building from
sources, on which branch are you building?
# What Application Server version are you using?
# What database are you using?
# What Java version are you using?
# What operating system are you using?
- Dave
Re: FreeMarker template error! - PROBLEM FOUND.
Posted by richiebaby <ri...@logica.com>.
PROBLEM FOUND! Is it a Roller bug?
I have been able to replicate the issue on my development installation by
simply posting a comment to a weblog entry whilst leaving the Name field
blank.
When inspecting the comment management page that lists all of the comments,
I can see that the 'Posted by' field is being set to "User from IP address
XX.XXX.XXX.X". This seems to be a default Roller functionality because in
the database (within the ROLLER_COMMENT table) I can see a value of <NULL>
within the NAME field for that comment.
Therefore I still have 3 questions:
Is this a known bug, is there a fix?
Is it possible to force the Name field to be mandatory when posting a
comment?
Can I perform direct sequel on the ROLLER_COMMENT table to replace the
<NULL> value with the text "Guest", for example?
Thank you in advance.
--
View this message in context: http://www.nabble.com/FreeMarker-template-error%21-when-managing-comments-tp16447315s12275p16467371.html
Sent from the Roller - Dev mailing list archive at Nabble.com.