In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
480 [In-Portal CMS] Front End bug report always 2009-12-23 02:59 2010-05-11 03:00
alex  
alex  
normal  
closed 5.0.2-B1  
fixed  
 
none 5.0.3-B1  
http://groups.google.com/group/in-portal-bugs/browse_thread/thread/12528972805268d6?hl=en
0
0000480: Fixes to "first_chars" / "cut_first" parameters
Currently "first_chars" / "cut_first" parameters are used to show only
first N characters of string. In case if string contains HTML, then it could
result in broken html. We should use strip_tags function, before applying
any string cutting.
patch 480-Fixes_to_first_chars_parameters-Dmitry-20100129-v1.patch (596) 2010-01-29 17:10
http://tracker.in-portal.org/file_download.php?file_id=255&type=bug
patch 480-Fixes_to_first_chars_parameters-Dmitry-20100203-v2.patch (1,441) 2010-02-03 18:42
http://tracker.in-portal.org/file_download.php?file_id=279&type=bug
patch first_chars_parameter_processing_alex_v2.patch (1,507) 2010-02-27 13:10
http://tracker.in-portal.org/file_download.php?file_id=306&type=bug
Issue History
2010-05-11 03:00 alex Note Added: 0002166
2010-05-11 03:00 alex Status resolved => closed
2010-03-11 08:52 alex Changeset attached 5.0.x r13198
2010-03-11 08:52 alex Note Added: 0001553
2010-03-11 08:52 alex Status reviewed and tested => resolved
2010-03-11 08:52 alex Fixed in Version => 5.0.3-B1
2010-03-11 08:52 alex Resolution open => fixed
2010-03-11 08:52 alex Assigned To !COMMUNITY => alex
2010-03-11 01:01 Dmitry Note Added: 0001540
2010-03-11 01:01 Dmitry Status needs testing => reviewed and tested
2010-02-27 13:13 alex Issue Monitored: Dmitry
2010-02-27 13:13 alex Note Added: 0001498
2010-02-27 13:10 alex Developer Dmitry => alex
2010-02-27 13:10 alex File Added: first_chars_parameter_processing_alex_v2.patch
2010-02-27 04:48 alex Issue End Monitor: alex
2010-02-26 16:57 Dmitry Developer => Dmitry
2010-02-03 18:44 Dmitry Note Added: 0001469
2010-02-03 18:44 Dmitry Issue Monitored: alex
2010-02-03 18:44 Dmitry Note Added: 0001468
2010-02-03 18:44 Dmitry Assigned To Dmitry => !COMMUNITY
2010-02-03 18:44 Dmitry Status needs work => needs testing
2010-02-03 18:42 Dmitry File Added: 480-Fixes_to_first_chars_parameters-Dmitry-20100203-v2.patch
2010-02-03 15:23 alex Note Added: 0001459
2010-02-03 15:23 alex Assigned To !COMMUNITY => Dmitry
2010-02-03 15:23 alex Status needs testing => needs work
2010-01-29 17:11 Dmitry Note Added: 0001442
2010-01-29 17:11 Dmitry Assigned To => !COMMUNITY
2010-01-29 17:11 Dmitry Status active => needs testing
2010-01-29 17:10 Dmitry File Added: 480-Fixes_to_first_chars_parameters-Dmitry-20100129-v1.patch
2010-01-06 06:20 alex Target Version Icebox => 5.0.3
2009-12-23 02:59 alex Target Version => Icebox
2009-12-23 02:59 alex New Issue
2009-12-23 02:59 alex Reference => http://groups.google.com/group/in-portal-bugs/browse_thread/thread/12528972805268d6?hl=en

Notes
(0001442)
Dmitry   
2010-01-29 17:11   
Patch uploaded - please test!
(0001459)
alex   
2010-02-03 15:23   
Are you sure, that all instances of cut_first / first_chars parameter were affected by your patch? It seems that this has no effect on SectionTitle tag. Please carefully search for all uses of that parameters.
(0001468)
Dmitry   
2010-02-03 18:44   
You were right. I have missed that part.

I have searched through out the system now and ONLY had 2 places (same db_tag_processor.php):

- SectionTitle method
- Field method

Please see new version of the patch.
(0001469)
Dmitry   
2010-02-03 18:44   
Reminder sent to: alex

Please see new version of the patch.
(0001498)
alex   
2010-02-27 13:13   
Reminder sent to: Dmitry

There were several issues with your patch:
1. function strip_tags was applied to field's value/section's even, when it were shorter, that needs for cutting.
2. comment about "A" tag in SectionTitle wasn't really explaining what's really happens there
3. only "cut_first" parameter was processed in "SectionTitle" tag, but first_chars/cut_first was processed in "Field" tag.

Based on you patch I've created my own and you should test it.
(0001540)
Dmitry   
2010-03-11 01:01   
Patch tested okay
(0001553)
alex   
2010-03-11 08:52   
Fix committed to 5.0.x branch. Commit Message:

Fixes 0000480: Fixes to "first_chars" / "cut_first" parameters
(0002166)
alex   
2010-05-11 03:00   
Closing all tasks from released versions.