Author Topic: Bug and Error Reports  (Read 9461 times)

0 Members and 1 Guest are viewing this topic.

Offline aboututila

Bug and Error Reports
« on: 08. August 2009, 17:33:27 »
Please post your Bug and Error reports to this Topic.

Please remember to include some basic configuration details;
  • which Module has the problem mod_sobi2featured or mod_sobi2simplefeatured
  • which version of the Module has the problem
  • which version of Joomla you are using
  • which version of the SOBI2 Component you are using
  • a link to the Site where the problem can be demonstrated

Thank you - Mark
The following Bugs/Problems have been confirmed;
Bug 001 [CONFIRMED] Apostrophes in SOBI2 data output as \' (includes patch download to fix this problem only)
Bug 002 [CONFIRMED] Checkbox group custom fields - unpredictable display (No solution at this time)
Bug 003 [CONFIRMED] 'Category ID(s) Filter' module parameter (includes patch download to fix this problem only)
Bug 004 [CONFIRMED] URL Custom Fields - Display Problem (No solution at this time)
Bug 005 [CONFIRMED] only one 'template'.helper.php file is loaded (possible work-around only)
Bug 006 [CONFIRMED] Calendar Custom Fields - Date sorting problems (includes partial solution)
Bug 007 [CONFIRMED] Default Image or Icon not displayed for Selected Entries (includes work-around)
Bug 008 [CONFIRMED] Duplicate URL's created by Joomla! SEF Components (No solution at this time)
Bug 009 [CONFIRMED] When Display Custom Field Labels = Yes and SOBI2 Language = default (includes patch download to fix this problem only)
Bug 010 [CONFIRMED] Advanced Parameters->Module Output Template not always show files (includes patch download to fix this problem only)
Bug 011 [CONFIRMED] Sort by Date created: (includes patch download to fix this problem only)
Bug 012 [CONFIRMED] Tooltip text on Image and Icon (includes patch download to fix this problem only)
« Last Edit: 30. September 2011, 01:50:03 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.2 Firefox 3.5.2 | View Profile


Offline aboututila

[CONFIRMED] Apostrophes in SOBI2 data displayed as \'
« Reply #1 on: 10. November 2009, 18:41:41 »
Bug found in mod_sobi2simplefeatured v2.0.6

Problem Description
If the SOBI2 Title, Custom Field Labels, or Custom Field data contains an Apostrophe (HTML code: '), then the data is displayed in the module output with a '\' backslash character (HTML code: \) preceding the apostrophe character (HTML code: ').

Solution
(1) Download the zip file attached to this posting.
     (Download only visible to registered and logged in Forum Users)
(2) Extract the file 'default.helper.php' from 'default.helper.zip'
(3) Replace the file;
     MyJoomlaInstallation/modules/mod_sobi2simplefeatured/tmpl/default.helper.php
     with the file 'default.helper.php' from 'default.helper.zip'.

This fix will be included in mod_sobi2simplefeatured v2.0.7

Explanation
Problem first reported in [SOLVED] Apostrophes in SOBI2 Title field output as \'
Problem also reported for Custom Field data in posting Re: [SOLVED] Apostrophes in SOBI2 Title field output as \'
This explanation is mostly for my benefit, so that I can keep a detailed record of why the change was needed.
SOBI2 at some previous version had problems if Apostrophes were used in an Entry Title field.
SOBI2 stores the Entry Title field containing an Apostrophe in the SOBI2 database with the Apostrophe 'escaped' with a backslash (refer PHP single quoted strings)
SOBI2 at some previous version generated SQL database errors if Apostrophes were used in an Entry Title field (since an Apostrophe is interpreted as a SQL single quote), and thus this was not an issue with mod_sobi2simplefeatured, since Apostrophe's were not valid in SOBI2 Title field values.
SOBI2 at some previous version, used the function replaceEntities ($str) in config.class.php to decode field data stored in the SOBI2 database. Although this function is still called in various SOBI2 code files, the function does nothing in SOBI2 RC 2.9.2.3 for Joomla 1.5.x as the function code is commented out.
Change was possibly made in SOBI2 2.9.2 (# Bugfix: (Joomla! 1.5 Only) Wrong encoding in native mode)
SOBI2 appears to be using the function getSobiStr ($string) in config.class.php as an alternative, so I have used this function in mod_sobi2simplefeatured, so that mod_sobi2simplefeatured should behave the same as SOBI2 for Title, Label, and Custom Data fields.

Regards - Mark
« Last Edit: 11. February 2010, 16:50:08 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.5 Firefox 3.5.5 | View Profile

Offline aboututila

[CONFIRMED] Checkbox group custom fields - unpredictable display
« Reply #2 on: 10. November 2009, 21:10:47 »
Bug found in mod_sobi2simplefeatured v2.0.6

Problem Description
The display of custom fields with Field Type = checkbox group may produce unpredictable results.

Solution
None available at this time.

Explanation
mod_sobi2simplefeatured has a 'problem' with checkbox group fields because these are the only SOBI2 Custom Data fields where the Custom Data Field may have more than one value (more than one check box can be selected). The problem is that mod_sobi2simplefeatured assumes that each SOBI2 custom data field only has one value, whereas checkbox group fields can have more than one value.

This problem results in unpredictable display of checkbox group custom field data for selected SOBI2 Entries by mod_sobi2simplefeatured when;
(i) a checkbox group custom field is displayed,
(ii) AND that checkbox group field has more than one value (more than one checkbox has been checked)
(iii) AND that checkbox group field is not used in the SOBI2 Entry Selection module parameters.

I am going to have to investigate further to find a fix for this bug.
Note to self:
For each checkbox group Option Name/Option Value pair, SOBI2 stores;
checkbox group 'Option Name' in field data_txt in table jos_sobi2_fields_data for each SOBI2 Entry for each checked box,
checkbox group 'Option Name' in field langKey in table jos_sobi2_language,
checkbox group 'Option Value' in field langValue  in table jos_sobi2_language,

when retrieving custom field data for checkbox group fields, in function getCustomFieldsData ($entries) in helper.php, there is a problem, since multiple (too many) [itemid],[fieldid],[data_txt],[langValue] rows are being returned. It looks as though need to change
# Define 'SELECT WHERE clause' conditions for Custom Field Labels
code to ensure correct Labels are returned for each [itemid],[fieldid],[data_txt] row.

And resolve how function selectEntries() in helper.php can return rows with multiple 'fieldId' with the same 'fieldid' number.

Then need to also 'flag' that a custom field has multiple values and then re-work function echoHTML_CustomFields($entry) in default.helper.php to iterate through 'rows' of 'fieldid' with multiple values (checkbox group fields).

All the above will probably require a major re-write of mod_sobi2simplefeatured.
« Last Edit: 18. October 2010, 19:21:26 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.5 Firefox 3.5.5 | View Profile

Offline aboututila

[CONFIRMED] 'Category ID(s) Filter' module parameter
« Reply #3 on: 13. November 2009, 21:26:31 »
Bug found in mod_sobi2simplefeatured v2.0.6

Problem Description
When module parameter 'Category ID(s) Filter' is used, incorrect filtering of Selected Entries can occur.

Solution
(1) Patch mod_sobi2simplefeatured v2.0.6, by
     (a) Downloading the zip file attached to this posting.
          (Download only visible to registered and logged in Forum Users)
     (b) Extracting the file 'helper.php' from 'helper.zip'
     (c) Replacing the file;
          MyJoomlaInstallation/modules/mod_sobi2simplefeatured/helper.php
          with the file 'helper.php' from 'helper.zip'.

This fix will be included in mod_sobi2simplefeatured v2.0.7

Explanation
Problem is a result of incorrect SQL statement code.
Problem identified during assisting with development of custom code (refer here)

In mod_sobi2simplefeatured v2.0.6 helper.php function selectEntries() at around line 256
Change
Code: [Select]
# Is Category Filtering required?
  if ($this->buildCategoryFilter()){
   # Define 'SELECT WHERE clause' conditions for Category Filtering
   $filter=' AND item.'.$db->nameQuote('itemid').' IN (SELECT '.$db->nameQuote('itemid').' FROM '.$db->nameQuote('#__sobi2_cat_items_relations').' WHERE '.$db->nameQuote('catid').' IN ('.$db->quote($this->category_filter).'))';
  }
To
Code: [Select]
# Is Category Filtering required?
  if ($this->buildCategoryFilter()){
   # Define 'SELECT WHERE clause' conditions for Category Filtering
   $filter=' AND item.'.$db->nameQuote('itemid').' IN (SELECT '.$db->nameQuote('itemid').' FROM '.$db->nameQuote('#__sobi2_cat_items_relations').' WHERE '.$db->nameQuote('catid').' IN ('.$this->category_filter.'))';
  }

Regards - Mark
« Last Edit: 30. September 2011, 20:33:11 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.5 Firefox 3.5.5 | View Profile

Offline aboututila

[CONFIRMED] URL Custom Fields - Display Problem
« Reply #4 on: 11. January 2010, 17:23:22 »
Bug found in mod_sobi2simplefeatured v2.0.6

Problem Description
Display of Custom Fields with URL Field = anything other than 'No' are not output with appropriate HTML elements.

Solution
The solution to this problem will probably require a major re-write of mod_sobi2simplefeatured.

Explanation
mod_sobi2simplefeatured does not determine 'or know' URL Field type of each SOBI2 custom field, and therefore does not output custom field data contained within HTML elements appropriate for that URL Field type.

For example;
For a Custom Field with URL Field = email
mod_sobi2simplefeatured outputs the HTML in the form
<div class="CCustomFieldId">
<span class="data">CustomFieldValue</span>
</div>

rather than
<div class="CCustomFieldId">
<span class="data">
<a href="mailto:CustomFieldValue">CustomFieldValue/a>
</span>
</div>

Regards - Mark
« Last Edit: 18. October 2010, 19:24:04 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.7 Firefox 3.5.7 | View Profile

Offline aboututila

[CONFIRMED] only one 'template'.helper.php file is loaded
« Reply #5 on: 13. January 2010, 19:10:17 »
Bug found in mod_sobi2simplefeatured v2.0.6

Problem Description
If you are using Custom Module Templates, mod_sobi2simplefeatured may not load the custom_template.helper.php associated with the custom template.

This problem can occur;
IF
(a) there is more than one copy/instance of mod_sobi2simplefeatured published on the same 'page',
AND,
(b) those copies/instances have different 'Advanced Parameters->Module Output Template' configurations.

Solution
At this time, I am unable to provide a 'quick fix' solution to this problem.
Currently, class mod_sobi2simplefeaturedTemplate extends mod_sobi2simplefeaturedHelper class.
I may be able to solve the problem by using a separate class (rather than extending the mod_sobi2simplefeaturedHelper class) and then creating a new instance of the class for each instance of the module published on the 'page', but I will need to do more investigation and testing and a major re-write of mod_sobi2simplefeatured may be required.

Possible Workaround
All copies/instances of mod_sobi2simplefeatured published on the same 'page' must be configured with the same 'Advanced Parameters->Module Output Template' settings.

Technical Explanation
In the file mod_sobi2simplefeatured.php, at around line 36, is the code;
Code: [Select]
# Include this Module HTML Template Helper Class for selected Template
 class_exists($module->module.'Template')|| require($module_path.DS.'tmpl'.DS.$params->get('template').'.helper.php');
If the PHP class 'mod_sobi2simplefeaturedTemplate' does not already exist, (the module has not been 'loaded'), then mod_sobi2simplefeatured.php will load the file;
MyJoomlaInstallation/modules/mod_sobi2simplefeatured/tmpl/template.helper.php
where template is the name of the Template configured in the module Advanced Parameters->Module Output Template

For example, if Advanced Parameters->Module Output Template = mycustom
then, the file;
MyJoomlaInstallation/modules/mod_sobi2simplefeatured/tmpl/mycustom.helper.php
will be loaded.

However, if the PHP class 'mod_sobi2simplefeaturedTemplate' already exists, (a copy/instance of the module has been loaded), then this file is not loaded.
So, if you have two instances of mod_sobi2simplefeatured published on the same 'page';
one configured with Template=default, and
the other configured with Template=mycustom
then
the template helper file (default.helper.php or mycustom.helper.php) associated with the first instance of the module published on the 'page' is the only one that is loaded.

Regards - Mark
« Last Edit: 18. October 2010, 19:25:04 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.7 Firefox 3.5.7 | View Profile

Offline aboututila

[CONFIRMED] Calendar Custom Fields - Date sorting problems
« Reply #6 on: 14. January 2010, 20:11:24 »
Bug found in mod_sobi2simplefeatured v2.0.6

Problem Description
(1) Sort Order by Custom Field with Field Type = calendar does not produce correctly sorted results if calendar date format is set to anything other than y-mm-dd

Partial Solution
Set Calendar Date Format to y-mm-dd
Refer Joomla! Administrator->Components->SOBI2->Configuration->Registry Editor->Section: [calendar]->date_format

Explanation
mod_sobi2simplefeatured does not determine 'or know' the Field Type of each SOBI2 custom field, and therefore does not the a Custom Field with Field Type=calendar contains dates. Also SOBI2 stores the data in this field as text (not a date) and in a date format determined by the setting of
Joomla! Administrator->Components->SOBI2->Configuration->Registry Editor->Section: [calendar]->date_format

For example, if the date is 17-March-2010
and
if date_format = dd-mm-y, then SOBI2 stores the date as the text string 17-03-2010
if date_format = dd.mm.y, then SOBI2 stores the date as the text string 17.03.2010
if date_format = y-mm-dd, then SOBI2 stores the date as the text string 1956-03-2010

When mod_sobi2simplefeatured is configured to sort selected entries by Custom Field (Output Controls - Sorting Order), the entries are 'text sorted' using the custom field data as it has been stored by SOBI2. Therefore, unless the dates have been stored as y-mm-dd, the resulting sort order is not consistent with the actual dates.

For example, if SOBI2 has stored the following date strings;
30-02-2010
29-03-2010
30-03-2009
and the (Output Controls - Sorting Order) has been set to Custom Field: ascending
then the entries will be sorted with
29-03-2010
30-02-2010
30-03-2009

and not
30-03-2009
29-03-2010
30-02-2010

as expected.

Note:
I am not sure when I will be able to implement a fix in mod_sobi2simplefeatured for this problem.

Regards - Mark
« Last Edit: 18. October 2010, 19:26:56 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.7 Firefox 3.5.7 | View Profile

Offline aboututila

[CONFIRMED] Default Image or Icon not displayed for Selected Entries
« Reply #7 on: 23. January 2010, 17:28:44 »
Bug found in mod_sobi2simplefeatured v2.0.6

Problem Description
If mod_sobi2simplefeatured is configured to display the Image or Icon for selected SOBI2 Entries and no Image or Icon has been configured for one of those selected SOBI2 Entries, then mod_sobi2simplefeatured does not display the default image or icon configured in;

Joomla Administrator->Components->SOBI2->Configuration->Registry Editor->Section: [frontpage]->default_img
and/or
Joomla Administrator->Components->SOBI2->Configuration->Registry Editor->Section: [frontpage]->default_ico

Explanation
mod_sobi2simplefeatured was originally designed with SOBI2 RC 2.8.0 and is compatible with SOBI2 RC 2.8.x and later. The ability to configure a default image and/or icon to be used if no image and/or icon is configured for a SOBI2 Entry was added to the SOBI2 Component in version RC 2.8.4

Workaround
Add the following CSS to your Site Template;
div.mod_sobi2simplefeatured div.entry div.noimage {width:Xpx;height:Ypx;background-image:url(http://YourWebSite/images/com_sobi2/clients/noimagefile);}
div.mod_sobi2simplefeatured div.entry div.noicon {width:Xpx;height:Ypx;background-image:url(http://YourWebSite/images/com_sobi2/clients/noiconfile);}

where;
noimagefile = the file name you have configured in Joomla Administrator->Components->SOBI2->Configuration->Registry Editor->Section: [frontpage]->default_img
noiconfile = the file name you have configured in Joomla Administrator->Components->SOBI2->Configuration->Registry Editor->Section: [frontpage]->default_ico
X = the width in pixels of the image displayed by the default_img/default_ico file
Y = the height in pixels of the image displayed by the default_img/default_ico file

Note: I intend to add the capability for mod_sobi2simplefeatured to display the default image and icon in the next release of mod_sobi2simplefeatured and increase the minimum requirements for mod_sobi2simplefeatured from SOBI2 RC 2.8.x and later to SOBI RC 2.8.4 or later.

Regards - Mark
« Last Edit: 23. January 2010, 17:41:32 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.7 Firefox 3.5.7 | View Profile

Offline aboututila

[CONFIRMED] Duplicate URL's created by Joomla! SEF Components
« Reply #8 on: 04. February 2010, 22:05:16 »
Problem found in mod_sobi2simplefeatured v2.0.6

Problem Description
Third Party Joomla! SEF components (such as ARTIO JoomSEF) may create duplicate URL pairs from the URL's output by mod_sobi2simplefeatured.

Solution
None at this time.
The solution would require a re-write of mod_sobi2simplefeatured to select a valid catid for each selected SOBI2 Entry.

Explanation
mod_sobi2simplefeatured internally sets the Category Id (catid) of the URL for each Selected SOBI2 Entry to zero (catid=0) before generating the URL output. This is because a SOBI2 Entry can belong to multiple categories and at the time I developed mod_sobi2simplefeatured v2.0.6 I did not have the SQL coding skills necessary to select a valid catid for each selected SOBI2 Entry and I could not devise an algorithm to determine which catid to use if the SOBI2 Entry being displayed by the module belonged to multiple categories.

So, to solve this problem I set the catid=0 and then use the SOBI2 function sobi2Config::sef() function to create the module URL's, so that at least the URL's are consistent with URL's used by the SOBI2 Component, (All SOBI2 Component URL's are created using the sobi2Config::sef() function).
If the SobiSEF plugin is enabled, the Module will produce SobiSEF plugin URL's, but if the SobiSEF plugin is disabled or not installed the Module will produce non-SEF ('standard' SOBI2 URL's).

The relevant code is in ..../modules/mod_sobi2simplefeatured/helper.php
$href=$this->subdir_prefix."index.php?option=com_sobi2&amp;sobi2Task=sobi2Details&amp;catid=0&amp;sobi2Id={$entry['itemId']}&amp;Itemid={$this->sobi2_config->sobi2Itemid}";
$href=sobi2Config::sef($href);

Note
Problem first reported in posting Sobi2 Simple Featured Module Creating Duplicate URLs

Regards - Mark
« Last Edit: 18. October 2010, 19:31:18 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.7 Firefox 3.5.7 | View Profile

Offline Strak

Re: [CONFIRMED] URL Custom Fields - Display Problem
« Reply #9 on: 08. February 2010, 03:37:08 »
Is this the reason I am experiencing this issue:

I have encountered a small problem with my display and I am curious if you have been approached by others with a similar issue.

In OUTPUT CONTROLS - Sobi 2 custom data fields - I have entered the following information:
Custom Field: (dropdown selection) field_country
Display it?    YES
Custom Field: (dropdown selection) field_job_start_date
Display it?    YES
Custom Field: (dropdown selection) field_salary_min
Display it?    YES
Additional Custom Field(s) to Display
Custom Field ID(s)    27
Display Custom Field Labels    Yes
Label Separator    <span> : </span>

The results that display on the site are:

Sierra-Leone:option_200
Job Start Date:2010-08-25
Salary (min):1800000
AFN | Afghanistan Afghanis:KRW | South Korea Won
Views : 25

Not sure where Sierra-Leone: comes from but option_200 is South Korea
Job Start dare is right and so is Salary but currency should have the label: Currency instead of AFN...

Any thoughts on what I have done wrong or how I can fix this?

Thanks in advance and please note that I am greatly appreciative of your excellent module sobi2simplefeatured. 

Bug found in mod_sobi2simplefeatured v2.0.6

Problem Description
Display of Custom Fields with URL Field = anything other than 'No' are not output with appropriate HTML elements.

Explanation
mod_sobi2simplefeatured does not determine 'or know' URL Field type of each SOBI2 custom field, and therefore does not output custom field data contained within HTML elements appropriate for that URL Field type.

For example;
For a Custom Field with URL Field = email
mod_sobi2simplefeatured outputs the HTML in the form
<div class="CCustomFieldId">
<span class="data">CustomFieldValue</span>
</div>

rather than
<div class="CCustomFieldId">
<span class="data">
<a href="mailto:CustomFieldValue">CustomFieldValue/a>
</span>
</div>

The solution to this problem will probably require a major re-write of mod_sobi2simplefeatured.

Regards - Mark
Country: Australia Australia |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.7 Firefox 3.5.7 | View Profile

Tags: