Bug 101723 - Public template used for all contexts
Public template used for all contexts
Status: CLOSED WONTFIX
Product: Red Hat Enterprise CMS
Classification: Retired
Component: other (Show other bugs)
nightly
All Linux
medium Severity medium
: ---
: ---
Assigned To: ccm-bugs-list
Jon Orris
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-06 03:02 EDT by redhatcms
Modified: 2007-04-18 12:56 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-05 13:56:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description redhatcms 2003-08-06 03:02:31 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2)
Gecko/20030208 Netscape/7.02

Description of problem:
Templates can be created and associated with specific 'contexts' for a
particular CMS content type - e.g. an 'xml' template can be associated with the
alternate context.

This template should be used to render items of this type when previewing and
publishing. In the referenced build the default template associated with the
'public' context of a content type is used for all contexts. As a side-effect
only one template can be used to render a content type.


Version-Release number of selected component (if applicable):
29th July 2003 Nightly

How reproducible:
Always

Steps to Reproduce:
1.Create a default template for the 'alternate' context
2.Preview or publish an instance of that content type.
3.
    

Actual Results:  The default public template is used.

Expected Results:  The newly created template should be used.

Additional info:

I have narrowed the problem down to 2 source files:
The class com.arsdigita.cms.dispatcher.AbstractTemplateResolver should be
checking for a HTTP parameter called 'templateContext' not just an attribute
called this as it does currently.
e.g. the corrected code is similiar to -

String context = (String)request.getAttribute("templateContext");

if ( context == null ) {
        context = (String) request.getParameter("templateContext");

Currently it does not check for the parameter. This parameter is the mechanism
used by the HttpHTMLProvider class when publishing.

Also it appears that the getTemplateFromURL() within the AbstractItemResolver
class should check if 'preview' is the first token when attemping to locate the
context. Currently it incorreclty returns null for the context when previewing.
Comment 1 Jon Orris 2006-09-05 13:56:21 EDT
Closing old tickets



Note You need to log in before you can comment on or make changes to this bug.