In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0000306 [In-Portal CMS] Template System bug report always 2009-09-18 03:24 2010-01-11 22:05
Reporter alex View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Fixed in Version 5.0.2
Status closed Product Version 5.0.0 Target Version 5.0.2
Time EstimateNo estimate
Summary 0000306: Parameter "result_to_var" doesn't work for m_Param tag
Description Parameter "result_to_var" allows to store tag result into parser parameter name, that is specified. It doesn't work for this code:

<inp2:m_Capture to_var="test">
data
</inp2:m_Capture>

<inp2:m_Param name="test" result_to_var="other"/>

Parameter "other" will be empty, but should contain "data" as it's value.
Additional Information Problem is hidden in "result_to_var" parameter implementation code. There are two places, where this parameter is processed:
* compiled template code
* PostProcess method of TagProcessor class

1. for non-pair tags this parameter is processed in both places
2. for pair tags this parameter is processed on in 2nd place (PostProcess method).

PostProcess method set's tag result to parser parameter on current deep level. That raises a problem, when deep level is changed after that. For example: all pair tags change deep level and they automatically loose parameter value, when deep level is restored.

I propose, that we should move all "result_to_var" parameter processing into compiled template code to avoid such problem in future.

=====================

In case if we comment-out "result_to_var" processing in PostProcess method, then there is fatal error about missing "_TagProcessor" in all grids in administrative console.
Tags No tags attached.
Reference
Change Log Message
Estimate Points 0
Attached Files patch file icon result_to_var fix in parser.patch [^] (4,741 bytes) 2009-10-11 09:35 [Show Content]
? file icon test.tpl [^] (3,294 bytes) 2009-10-11 09:35

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
User avatar (0000481)
Dmitry (manager)
2009-09-18 11:11

How much development time we need here?
User avatar (0000483)
alex (manager)
2009-09-18 16:55

Approximately 2 hours.
User avatar (0000500)
Dmitry (manager)
2009-09-21 11:35

Ok, I think we need to address this in 5.0.2
User avatar (0000876)
alex (manager)
2009-10-11 09:39

Fixed, for testing place "test.tpl" (attached) into root of front-end theme and go see it in browser by url: http://www.site.com/?t=test.

There are 10 tests and among them:
9 pass in after patch is applied
3 pass before patch is applied
1 (last one) fail in any case (see test.tpl for details)

Also I've discovered problem, that "plus" parameter (of m_Param tag) was applied to original parameter instead of one, specified in result_to_var parameter (when used).

Please compare results before/after patch was applied and see test.tpl to ensure, that what you see as result is the one you expect from tags used.
User avatar (0000914)
Dmitry (manager)
2009-10-18 02:18

Seems to be working good.
User avatar (0000930)
alex (manager)
2009-10-20 03:55

Fix committed to 5.0.x branch. Commit Message:

Fixes 0000306: Parameter "result_to_var" doesn't work for m_Param tag
User avatar (0001374)
Dmitry (manager)
2010-01-11 22:05

Closing completed tasks.

- Related Changesets
In-Portal CMS: 5.0.x r12704
Timestamp: 2009-10-20 03:55:13
Author: alex
Details ] Diff ]
Fixes 0000306: Parameter "result_to_var" doesn't work for m_Param tag
mod - /in-portal/branches/5.0.x/core/kernel/nparser/nparser.php Diff ] File ]
mod - /in-portal/branches/5.0.x/core/kernel/nparser/ntags.php Diff ] File ]
mod - /in-portal/branches/5.0.x/core/kernel/processors/main_processor.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2010-01-11 22:05 Dmitry Note Added: 0001374
2010-01-11 22:05 Dmitry Status resolved => closed
2009-10-20 03:55 alex Note Added: 0000930
2009-10-20 03:55 alex Status reviewed and tested => resolved
2009-10-20 03:55 alex Fixed in Version => 5.0.2
2009-10-20 03:55 alex Resolution open => fixed
2009-10-20 03:55 alex Changeset attached 5.0.x r12704
2009-10-18 02:18 Dmitry Note Added: 0000914
2009-10-18 02:18 Dmitry Assigned To !COMMUNITY => alex
2009-10-18 02:18 Dmitry Status needs testing => reviewed and tested
2009-10-11 09:39 alex Time Estimate Removed 2 =>
2009-10-11 09:39 alex Note Added: 0000876
2009-10-11 09:39 alex Assigned To alex => !COMMUNITY
2009-10-11 09:39 alex Status active => needs testing
2009-10-11 09:35 alex File Added: test.tpl
2009-10-11 09:35 alex File Added: result_to_var fix in parser.patch
2009-10-03 07:53 administrator Status reviewed and tested => active
2009-09-23 13:25 alex Time Estimate Added 2
2009-09-21 11:35 Dmitry Note Added: 0000500
2009-09-21 11:35 Dmitry Assigned To Dmitry => alex
2009-09-21 11:35 Dmitry Status needs work => reviewed and tested
2009-09-21 03:20 alex Target Version => 5.0.2
2009-09-18 16:55 alex Note Added: 0000483
2009-09-18 16:55 alex Assigned To alex => Dmitry
2009-09-18 16:55 alex Status needs feedback => needs work
2009-09-18 11:11 Dmitry Note Added: 0000481
2009-09-18 11:11 Dmitry Assigned To => alex
2009-09-18 11:11 Dmitry Status active => needs feedback
2009-09-18 07:53 alex Additional Information Updated View Revisions
2009-09-18 03:24 alex New Issue



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker