roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Johnson (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (ROL-1930) Saving Template causes Null Pointer Exception
Date Sun, 13 Nov 2011 15:11:51 GMT

    [ https://issues.apache.org/jira/browse/ROL-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149300#comment-13149300
] 

David Johnson edited comment on ROL-1930 at 11/13/11 3:10 PM:
--------------------------------------------------------------

This was originally a fix for "Saving Template causes Null Pointer Exception"
URL: http://svn.apache.org/viewvc?rev=1201435&view=rev

But... once I fixed the problem I found a series of other problems and ended up making some
fundamental changes in the way that Roller's new mobile template support is implemented. I
will summarize.

1) The Template Edit page now uses the YUI tab control to switch between a Page's standard
and mobile template code on the client side. Both values are saved on the client-side and
switching tabs no longer causes a page refresh.

2) This is the big change: Instead of determining the device-type and then injecting the right
template code into the Roller Page object, which could cause other requests to get the wrong
data inside the Page object, we now determine the device type and pass it down deep into Roller's
rendering engine. At the RollerResourceLoader level we use the deviceType to fetch the correct
template code for the deviceType.

3) What we called "type" in many places is now an enum called DeviceType and the variable
is called deviceType instead of "type" everywhere.
                
      was (Author: djohnson):
    URL: http://svn.apache.org/viewvc?rev=1201435&view=rev

This was originally a fix for "Saving Template causes Null Pointer Exception"

But once I fixed the problem I found a series of other problems and ended up making some fundamental
changes in the way that Roller's new mobile template support is implemented. I will summarize.

1) The Template Edit page now uses the YUI tab control to switch between a Page's standard
and mobile template code on the client side. Both values are saved on the client-side and
switching tabs no longer causes a page refresh.

2) This is the big change: Instead of determining the device-type and then injecting the right
template code into the Roller Page object, which could cause other requests to get the wrong
data inside the Page object, we now determine the device type and pass it down deep into Roller's
rendering engine. At the RollerResourceLoader level we use the deviceType to fetch the correct
template code for the deviceType.

3) What we called "type" in many places is now an enum called DeviceType and the variable
is called deviceType instead of "type" everywhere.
                  
> Saving Template causes Null Pointer Exception
> ---------------------------------------------
>
>                 Key: ROL-1930
>                 URL: https://issues.apache.org/jira/browse/ROL-1930
>             Project: Roller
>          Issue Type: Bug
>          Components: User Interface - General
>    Affects Versions: 5.1
>            Reporter: David Johnson
>            Assignee: David Johnson
>            Priority: Blocker
>             Fix For: 5.1
>
>
> Steps to reproduce:
> 1) Upgrade from Roller 5.0 to Roller 5.1 via normal upgrade process
> 2) Login and edit one of your templates
> 3) Save your template and you'll get an error, if you look in the logs you will see that
it is a Null Pointer Exception
> This is caused because the Template does not have a "Template Code" object associated
with it yet. 
> One possible way to fix this is: if a template code object is not found, then create
a new one.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message