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 Advanced Details Jump to Notes ] Wiki ] View Simple ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0001112 [In-Portal CMS] Data Management bug report always 2011-08-24 04:19 2011-09-19 16:08
Reporter alex View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Platform
Status closed   OS
  OS Version
ETA none Fixed in Version 5.1.3 Product Version 5.1.3-RC2
  Target Version 5.1.3 Product Build
Time EstimateNo estimate
Summary 0001112: Field options are changed by accident during image (from field) display
Description Each In-Portal's database table field, that allows image upload to be performed is described with a set of upload-specific options in associated database table unit config file.

'Fields' => Array (
    'Logo' => Array (
        'type' => 'string',
        'formatter' => 'kUploadFormatter',
        'upload_dir' => IMAGES_PATH.'manufacturers/',
        'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_hint_ImageFiles!',
        'multiple' => false, 'thumb_format' => 'resize:100x100',
        'max_len' => 255, 'not_null' => 1, 'default' => ''
    ),
),

There is also a rarely used option called "direct_links", that is turned off by default.

When this option:
is turned on, then path to image is shown to user (in url to that image), e.g. http://www.website.tld/system/images/manufacturers/image_filename.jpg
is turned off then path is totally hidden and intermediate In-Portal's event OnViewFile is used to display an image: http://www.website.tld/index.php?env=-page_template_here:m0--1--s-1:manuf-0---OnViewFile-t1&field=Logo&file=619339.jpg
So if you don't want to disclose actual location of file, then you'd probably with that option to be turned off (that is by default).

However, when you're trying to use 1 field to display any 2+ images not stored in that field:

$object->SetDBField('Logo', 'image1.jpg');
$url_one = $object->GetField('Logo', 'full_url');

$object->SetDBField('Logo', 'image2.jpg');
$url_two = $object->GetField('Logo', 'full_url');

then $url_one will have link with OnViewFile event, but $url_two will have direct link to an image.


That's a bug, since direct_link option is changed in the middle by mistake.
Steps To Reproduce
Additional Information
Tags No tags attached.
Reference https://groups.google.com/d/topic/in-portal-bugs/zGE2RDn2-fo/discussion
Change Log Message Fixed accidental "direct_link" field option change during image display
Estimate Points 0
Attached Files patch file icon dont_change_field_options_during_image_url_formatting.patch [^] (1,550 bytes) 2011-08-24 04:19 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
has duplicate 0000063closed (5.2.0) Option "direct_links" is ignored, when multiple files are uploaded. 

-  Notes
User avatar (0003721)
Dmitry (manager)
2011-09-07 15:57

Moved to 5.1.3

Task has been reviewed and tested.

Ready for commit.
User avatar (0003744)
alex (manager)
2011-09-16 09:26

Fix committed to 5.1.x branch. Commit Message:

Fixes 0001112: Field options are changed by accident during image (from field) display
User avatar (0003779)
alex (manager)
2011-09-19 16:08

Closing, since 5.1.3 release has been released.

- Related Changesets
In-Portal CMS: 5.1.x r14522
Timestamp: 2011-09-16 09:26:27
Author: alex
Details ] Diff ]
Fixes 0001112: Field options are changed by accident during image (from field) display
mod - /in-portal/branches/5.1.x/core/kernel/utility/formatters/upload_formatter.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2011-11-30 04:41 alex Relationship added has duplicate 0000063
2011-09-19 16:08 alex Note Added: 0003779
2011-09-19 16:08 alex Status resolved => closed
2011-09-16 09:26 alex Note Added: 0003744
2011-09-16 09:26 alex Status reviewed and tested => resolved
2011-09-16 09:26 alex Fixed in Version => 5.1.3
2011-09-16 09:26 alex Resolution open => fixed
2011-09-16 09:26 alex Assigned To !COMMUNITY => alex
2011-09-16 09:26 alex Changeset attached 5.1.x r14522
2011-09-07 15:57 Dmitry Note Added: 0003721
2011-09-07 15:57 Dmitry Status needs testing => reviewed and tested
2011-09-07 15:57 Dmitry Target Version Icebox => 5.1.3
2011-08-24 04:21 alex Assigned To => !COMMUNITY
2011-08-24 04:21 alex Developer => alex
2011-08-24 04:21 alex Status active => needs testing
2011-08-24 04:21 alex Reference => https://groups.google.com/d/topic/in-portal-bugs/zGE2RDn2-fo/discussion
2011-08-24 04:19 alex New Issue
2011-08-24 04:19 alex File Added: dont_change_field_options_during_image_url_formatting.patch
2011-08-24 04:19 alex Change Log Message => Fixed accidental "direct_link" field option change during image display



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

Powered by Mantis Bugtracker