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

0 Members and 1 Guest are viewing this topic.

Online aboututila

Re: Bug and Error Reports
« Reply #10 on: 08. February 2010, 15:29:57 »
footprints,

(1) You do not say which versions of Joomla! and SOBI2 you are using.
      I will assume you are using Joomla! 1.5.15 and SOBI2 RC 2.9.2.3

(2) I am guessing that your Custom Field;
     field_country
     has a Custom Field Type = select list

If so, use;
Joomla Administrator->Components->SOBI2->Configuration->Custom Fields Manager
to edit your settings for Custom Field = field_country
Look at the 'List of predefined option values for select list/checkbox group'
Make sure that Option Name and Option Value pairs/rows have the same values.
For example;
One row might contain;
Option Name = Spain
Option Value = Spain

(3) You say "currency should have the label: Currency instead of AFN"
What is the Field Name, Custom Field ID, and Field Type for this Custom Field?
I am assuming that the Custom Field ID = 27

I am assuming the Field Type for this Custom Field = select list
If so, then use;
Joomla Administrator->Components->SOBI2->Configuration->Custom Fields Manager
to edit your settings for Custom Field ID = 27
Look at the 'List of predefined option values for select list/checkbox group'
Make sure that Option Value = 'Currency' for each pair/row.
For example;
Find the row that contains;
Option Name = KRW | South Korea Won
and set
Option Value = Currency
for that row

(4) General Rule for Select Lists
mod_sobi2simplefeatured displays Select List data using the following 'rule'.
For each pair/row in the 'List of predefined option values for select list/checkbox group',
mod_sobi2simplefeatured displays the contents of;
Option Name as the Custom Field 'value'
Option Value as the Custom Field 'label'

I am aware that this is counter intuitive, but it needs to work this way to be consist with the way SOBI2 uses the data.

(5) Languages.
I assuming you are not using any SOBI2 languages other than the default English language.
If you are using another SOBI2 Language, then you need to ensure that the language set in the Custom Fields Manager is the same as the language set in
Administrator->Extensions->SOBI2->Configuration->General Configuration->General->SOBI2 Language
(Refer Languages Configuring mod_sobi2simplefeatured when using a SOBI2 language other than English)

I hope this helps - Mark
« Last Edit: 08. February 2010, 16:04:55 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.7 Firefox 3.5.7 | View Profile


Online aboututila

Bug found in mod_sobi2simplefeatured v2.0.6

Problem Description
When
mod_sobi2simplefeatured configuration->Output Controls->SOBI2 Custom data fields->Display Custom Field Labels = Yes
and
SOBI2->Configuration->General Configuration->SOBI2 Language = default
then
mod_sobi2simplefeatured does not display Custom Fields and generates PHP 'Notice' errors of the form;
Notice: Undefined index: fieldLabelX in MyJoomlaInstallation\modules\mod_sobi2simplefeatured\tmpl\default.helper.php on line 154

Note: It is possible that the PHP 'Notice' errors may not be displayed.
The display of PHP 'Notice' errors depends on the Web Server PHP Configuration settings for display_errors, error_reporting and error_log
See Joomla! Administrator->Help->System Info->PHP Information
for current values of these PHP settings

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

(1) Alternatively,
if mod_sobi2simplefeatured configuration->Output Controls->SOBI2 Custom data fields->Display Custom Field Labels = Yes
DO NOT configure
SOBI2->Configuration->General Configuration->SOBI2 Language = default
DO configure
SOBI2->Configuration->General Configuration->SOBI2 Language = 'language name'
where 'language name' = an installed SOBI2 language, for example 'english'

Explanation
Problem first reported in [SOLVED] Display Custom Field Labels - PHP Error Message

The following explanation is mostly for my benefit, so that I can keep a detailed record of the problem and the solution.

The SOBI2 Language settings are used by mod_sobi2simplefeatured to determine which language is used for the Custom Field Labels when
mod_sobi2simplefeatured->Output Controls->SOBI2 Custom data fields->Display Custom Field Labels = Yes
by retrieving 'langValue' from jos_sobi2_language where 'sobi2Lang' =
SOBI2->Configuration->General Configuration->SOBI2 Language

The current 2.0.6 version of mod_sobi2simplefeatured does not read/understand/use
Joomla! Administrator->Extensions->Language Manager->Language Name = Default
The reason for this is complicated, but essentially it is(was) because;
(a) it is possible to have a SOBI2 Language pack installed without the corresponding Joomla! Language pack, and;
(b) It is possible for the Joomla! Language packs to use different language identifiers than the SOBI2 Language packs, and therefore I would continually need to update mod_sobi2simplefeatured to maintain a table equating Joomla! Language packs with SOBI2 Language packs.
The problem is discussed in the posting SOBI2/Joomla! - Language methods and properties

The attached updated helper.php (v1.1.0-patchA) file has been modified to use the SOBI2 Configuration property
$sobiconfig = &sobi2Config::getInstance();
$language = $sobiconfig->sobi2Language;
and the changes to helper.php (v1.1.0) are;
delete
Line 403 $tables.=', '.$db->nameQuote('#__sobi2_config').'AS config';
as no longer need to use this table

delete
Line 412 $conditions.=' AND config.'.$db->nameQuote('configKey').'='.$db->quote('language');
as no longer need to use this condition

modify
Line 413 $conditions.=' AND lang.'.$db->nameQuote('sobi2Lang')."=config.".$db->nameQuote('configValue');
to
$conditions.=' AND lang.'.$db->nameQuote('sobi2Lang')."= '".$this->sobi2_config->sobi2Language."'";

Regards - Mark
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.6.10 Firefox 3.6.10 | View Profile

Online aboututila

Bug found in mod_sobi2simplefeatured v2.0.6

Problem Description
If you are using Custom Module Templates, mod_sobi2simplefeatured may not always show your custom template file in the Advanced Parameters->Module Output Template->Template 'drop down' selection list.

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

This fix will be included in mod_sobi2simplefeatured v2.0.7

Explanation
Problem first reported in 5-Nov-2010 Forum PM message
Problem was due to regex expression in filter="(?i)[^(helper)]\.php$"
Code: [Select]
<!-- Case-insensitive exclude '.php' filenames containing the string 'helper' -->
<param name="template" type="filelist" default="default.php" label="LABEL:MODULE-TEMPLATE" description="DESC:MODULE-TEMPLATE" directory="modules/mod_sobi2simplefeatured/tmpl" filter="(?i)[^(helper)]\.php$" hide_none="TRUE" hide_default="FALSE" stripext="TRUE" />
not displaying ALL *.php filenames not containing 'helper' in the filename.
I have changed code above to
Code: [Select]
<!-- Case-insensitive exclude '.php' filenames containing the string 'helper' -->
<param name="template" type="filelist" default="default.php" label="LABEL:MODULE-TEMPLATE" description="DESC:MODULE-TEMPLATE" directory="modules/mod_sobi2simplefeatured/tmpl" filter="\.php$" exclude="\.helper" hide_none="TRUE" hide_default="FALSE" stripext="TRUE" />
and this seems to have solved the problem.

Regards - Mark
« Last Edit: 05. November 2010, 22:18:03 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.6.12 Firefox 3.6.12 | View Profile

Offline nehogymar

  • Sobi Newbie
  • *
  • Posts: 5
Re: Bug and Error Reports
« Reply #13 on: 09. November 2010, 12:52:25 »
Thanks for your kind effort aboututila!

I confirm that your patch is works! ;)
Country: Hungary Hungary |  OS: Windows XP Windows XP |  Browser: Firefox 3.6.12 Firefox 3.6.12 | View Profile

Online aboututila

Re: Bug and Error Reports
« Reply #14 on: 09. November 2010, 20:13:36 »
I confirm that your patch is works!
Thank you for the feedback.
I assume you are referring to the [CONFIRMED] Advanced Parameters->Module Output Template not always show files patch?

Regards - Mark
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.6.12 Firefox 3.6.12 | View Profile

Online aboututila

[CONFIRMED] Sort by Date created:
« Reply #15 on: 07. July 2011, 20:24:22 »
Bug found in mod_sobi2simplefeatured v2.0.6

Problem Description
When configuring mod_sobi2simplefeatured with;
Output Controls - Sorting Order - Output Entries sorted by = Date created: most recent first
Output Controls - Sorting Order - Output Entries sorted by = Date created: most recent last

mod_sobi2simplefeatured actually sorts by SOBI2 itemid (ascending and descending), not SOBI2 Entry Creation Date.
Problem first reported "Published"-date changed, not recognised by Module

Solution
(1) Download the zip file attached to this posting, (this patch only fixes this reported problem).
     (Download only visible to registered and logged in Forum Users)
(2) extract the file 'helper.php' from 'helper.zip'
(3) Replace the file;
     MyJoomlaInstallation/modules/mod_sobi2simplefeatured/helper.php
     with the file ''helper.php' extracted from 'helper.zip'

Alternatively
(1) Edit the file MyJoomlaInstallation/modules/mod_sobi2simplefeatured/helper.php
(2) Find the PHP Code beginning around Line 218 and change
From
# Define database Fields needed for Entry Selection and/or 'standard data' sorting
 $fields='item.'.$db->nameQuote('itemid');
 $fields.=', item.'.$db->nameQuote('title');
 $fields.=', item.'.$db->nameQuote('icon');
 $fields.=', item.'.$db->nameQuote('image');
 $fields.=', item.'.$db->nameQuote('hits');
 $fields.=', item.'.$db->nameQuote('last_update'); # for Sorting only
 $fields.=', cf_itemid.'.$db->nameQuote('itemid');

To
# Define database Fields needed for Entry Selection and/or 'standard data' sorting
 $fields='item.'.$db->nameQuote('itemid');
 $fields.=', item.'.$db->nameQuote('title');
 $fields.=', item.'.$db->nameQuote('icon');
 $fields.=', item.'.$db->nameQuote('image');
 $fields.=', item.'.$db->nameQuote('hits');
 $fields.=', item.'.$db->nameQuote('publish_up'); # for Sorting only
 $fields.=', item.'.$db->nameQuote('last_update'); # for Sorting only
 $fields.=', cf_itemid.'.$db->nameQuote('itemid');

(3) Find the PHP Code beginning around Line 262 and change
From
# Define Sorting Order statement
$sort=NULL;
if ($this->params->get('sortOrder')=='Random'){$sort=' ORDER BY RAND()';}
elseif ($this->params->get('sortOrder')=='ItemidAsc'){$sort=' ORDER BY item.'.$db->nameQuote('itemid').' ASC';}
elseif ($this->params->get('sortOrder')=='ItemidDesc'){$sort=' ORDER BY item.'.$db->nameQuote('itemid').' DESC';}

To
# Define Sorting Order statement
$sort=NULL;
if ($this->params->get('sortOrder')=='Random'){$sort=' ORDER BY RAND()';}
elseif ($this->params->get('sortOrder')=='ItemidAsc'){$sort=' ORDER BY item.'.$db->nameQuote('publish_up').' ASC';}
elseif ($this->params->get('sortOrder')=='ItemidDesc'){$sort=' ORDER BY item.'.$db->nameQuote('publish_up').' DESC';}

This fix will be included in mod_sobi2simplefeatured v2.0.7

Explanation
When configuring mod_sobi2simplefeatured with;
Output Controls - Sorting Order - Output Entries sorted by = Date created: most recent first
Output Controls - Sorting Order - Output Entries sorted by = Date created: most recent last

mod_sobi2simplefeatured actually sorts by by SOBI2 itemid, because under 'normal' situations the SOBI2 Entry creation date (publish_up) and the SOBI2 itemid number sequencing should produce the same sort results.

However, while it is not possible for a SOBI2 Administrator to change a SOBI2 itemid,  it is possible for a SOBI2 Administrator to change a SOBI2 Entry creation date, and hence the Sorting by 'Date created" options produce the wrong results.

For mod_sobi2simplefeatured v2.0.7
I need to;
(1) Add the option to rename the Sort by Creation Date to Sort by Sobi2 itemid and add the option to Sort by Creation Date by;
(a) Change mod_sobi2simplefeatured.xml
From
<!-- Start Output Controls - Sort Order -->
 <param type="spacer" default="GROUP:OUTPUT-CONTROL-SORT-ORDER" />
 <param name="sortOrder" type="list" default="Random" label="LABEL:SORT-ORDER" description="DESC:SORT-ORDER">
   <option value="Random">OPTION:SORT-RANDOM</option>
   <option value="ItemidDesc">OPTION:SORT-ITEMID-DESC</option>
   <option value="ItemidAsc">OPTION:SORT-ITEMID-ASC</option>
   <option value="EditDesc">OPTION:SORT-EDIT-DESC</option>
   <option value="EditAsc">OPTION:SORT-EDIT-ASC</option>

To
<!-- Start Output Controls - Sort Order -->
 <param type="spacer" default="GROUP:OUTPUT-CONTROL-SORT-ORDER" />
 <param name="sortOrder" type="list" default="Random" label="LABEL:SORT-ORDER" description="DESC:SORT-ORDER">
   <option value="Random">OPTION:SORT-RANDOM</option>
   <option value="ItemidDesc">OPTION:SORT-ITEMID-DESC</option>
   <option value="ItemidAsc">OPTION:SORT-ITEMID-ASC</option>
   <option value="CreateDesc">OPTION:SORT-CREATE-DESC</option>
   <option value="CreateAsc">OPTION:SORT-CREATE-ASC</option>
   <option value="EditDesc">OPTION:SORT-EDIT-DESC</option>
   <option value="EditAsc">OPTION:SORT-EDIT-ASC</option>

(b) Change en-GB.mod_sobi2simplefeatured.ini
From
SPACER:SORTING = <span style='color:#0B55C4;'>Output Control - Sort Order</span>
LABEL:SORT-ORDER = Output Entries sorted by
DESC:SORT-ORDER = Select the order in which each Entry should be output.
OPTION:SORT-RANDOM = Random
OPTION:SORT-ITEMID-ASC = Date created: most recent last
OPTION:SORT-ITEMID-DESC = Date created: most recent first
OPTION:SORT-EDIT-ASC = Date edited: most recent last
OPTION:SORT-EDIT-DESC = Date edited: most recent first

To
SPACER:SORTING = <span style='color:#0B55C4;'>Output Control - Sort Order</span>
LABEL:SORT-ORDER = Output Entries sorted by
DESC:SORT-ORDER = Select the order in which each Entry should be output.
OPTION:SORT-RANDOM = Random
OPTION:SORT-ITEMID-ASC = Sobi2 itemid: most recent last
OPTION:SORT-ITEMID-DESC = Sobi2 itemid: most recent first
OPTION:SORT-CREATE-ASC = Date created: most recent last
OPTION:SORT-CREATE-DESC = Date created: most recent first
OPTION:SORT-EDIT-ASC = Date edited: most recent last
OPTION:SORT-EDIT-DESC = Date edited: most recent first

(c) Change helper.php
From
# Define database Fields needed for Entry Selection and/or 'standard data' sorting
 $fields='item.'.$db->nameQuote('itemid');
 $fields.=', item.'.$db->nameQuote('title');
 $fields.=', item.'.$db->nameQuote('icon');
 $fields.=', item.'.$db->nameQuote('image');
 $fields.=', item.'.$db->nameQuote('hits');
 $fields.=', item.'.$db->nameQuote('last_update'); # for Sorting only
 $fields.=', cf_itemid.'.$db->nameQuote('itemid');

To
# Define database Fields needed for Entry Selection and/or 'standard data' sorting
 $fields='item.'.$db->nameQuote('itemid');
 $fields.=', item.'.$db->nameQuote('title');
 $fields.=', item.'.$db->nameQuote('icon');
 $fields.=', item.'.$db->nameQuote('image');
 $fields.=', item.'.$db->nameQuote('hits');
 $fields.=', item.'.$db->nameQuote('publish_up'); # for Sorting only
 $fields.=', item.'.$db->nameQuote('last_update'); # for Sorting only
 $fields.=', cf_itemid.'.$db->nameQuote('itemid');

and

From
# Define Sorting Order statement
$sort=NULL;
if ($this->params->get('sortOrder')=='Random'){$sort=' ORDER BY RAND()';}
elseif ($this->params->get('sortOrder')=='ItemidAsc'){$sort=' ORDER BY item.'.$db->nameQuote('itemid').' ASC';}
elseif ($this->params->get('sortOrder')=='ItemidDesc'){$sort=' ORDER BY item.'.$db->nameQuote('itemid').' DESC';}
elseif ($this->params->get('sortOrder')=='EditAsc'){$sort=' ORDER BY item.'.$db->nameQuote('last_update').' ASC';}
elseif ($this->params->get('sortOrder')=='EditDesc'){$sort=' ORDER BY item.'.$db->nameQuote('last_update').' DESC';}

To
# Define Sorting Order statement
$sort=NULL;
if ($this->params->get('sortOrder')=='Random'){$sort=' ORDER BY RAND()';}
elseif ($this->params->get('sortOrder')=='ItemidAsc'){$sort=' ORDER BY item.'.$db->nameQuote('itemid').' ASC';}
elseif ($this->params->get('sortOrder')=='ItemidDesc'){$sort=' ORDER BY item.'.$db->nameQuote('itemid').' DESC';}
elseif ($this->params->get('sortOrder')=='CreateAsc'){$sort=' ORDER BY item.'.$db->nameQuote('publish_up').' ASC';}
elseif ($this->params->get('sortOrder')=='CreateDesc'){$sort=' ORDER BY item.'.$db->nameQuote('publish_up').' DESC';}
elseif ($this->params->get('sortOrder')=='EditAsc'){$sort=' ORDER BY item.'.$db->nameQuote('last_update').' ASC';}
elseif ($this->params->get('sortOrder')=='EditDesc'){$sort=' ORDER BY item.'.$db->nameQuote('last_update').' DESC';}

(2) and perhaps also investigate of adding sorting by SOBI2 Entry Expiration Date (publish_down), which will be a little more complicated as the default value for publish_down is 0000-00-00 00:00:00 (for never expires), otherwise it is set to an actual y-m-d h:i:s date value.

Regards - Mark
« Last Edit: 08. July 2011, 18:11:38 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 5.0 Firefox 5.0 | View Profile

Offline fci

  • SobiPro Gold Club Member
  • Sobi Newbie
  • *
  • Posts: 26
  • Reviews:

    What is it?

Re: Bug and Error Reports
« Reply #16 on: 29. September 2011, 04:01:54 »
Dear Mark and Others,

I am also having problems implementing this patch. for some reason I keep getting this error:

Parse error: syntax error, unexpected ')' in C:\xampp\htdocs\oa\modules\mod_sobi2simplefeatured\helper.php on line 259

I have pasted the code several times, and had a developer friend try to debug it, but to no avail... so I am hoping you might have an answer? I am using latest joomla and sobi.

I checked my helper file code, which is the same as the one that comes with the v2.06 of the module, apart from the patch...

I really don't know what might be wrong as I don't know php syntax well enough...hoping someone will know. If there is any other info that would help debug please let me know.

with thanks,
Greg
Country: Thailand Thailand |  OS: Windows 7/Server 2008 R2 Windows 7/Server 2008 R2 |  Browser: Firefox 7.0 Firefox 7.0 | View Profile

Online aboututila

Re: Bug and Error Reports
« Reply #17 on: 30. September 2011, 01:06:05 »
I am also having problems implementing this patch.
fci,

I am sorry, but I am not sure which patch you are referring to.
If you are referring to [CONFIRMED] 'Category ID(s) Filter' module parameter
then there was indeed a syntax error in the patch code I had previously posted.
I have now updated this post to correct the syntax error.
I have also updated this post to include a patch download to fix this problem only.

Regards - Mark
« Last Edit: 30. September 2011, 01:10:46 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 7.0 Firefox 7.0 | View Profile

Online aboututila

[CONFIRMED] Tooltip text on Image and Icon
« Reply #18 on: 30. September 2011, 01:46:26 »
Bug found in mod_sobi2simplefeatured v2.0.6

Problem Description
When SOBI2 standard data fields Icon and/or Image are displayed for an Entry, no 'tooltip' text is displayed when the mouse pointer moves over the element.

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
This explanation is mostly for my benefit, so that I can keep a detailed record of why the change was needed.
The problem was first reported in Title of the entry as hover-text of icon
mod_sobi2simplefeatured v2.0.6 did not include text for the Title Attribute when outputting a SOBI2 Entry Icon or Image, only the required Alt Attribute was output.
(a) the Alt Attribute Text should be displayed if the image is missing or cannot be displayed for some reason.
(b) the Title Attribute Text should be displayed when the mouse pointer moves over the element.
To fix this problem
modify the code in default.helper changing all occurrences of
'" alt="',$entry['title'],'"

to
'" alt="',$entry['title'],'" title="',$entry['title'],'"

Regards - Mark
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 7.0 Firefox 7.0 | View Profile

Offline fci

  • SobiPro Gold Club Member
  • Sobi Newbie
  • *
  • Posts: 26
  • Reviews:

    What is it?

Re: Bug and Error Reports
« Reply #19 on: 30. September 2011, 04:24:56 »
I am also having problems implementing this patch.
fci,

I am sorry, but I am not sure which patch you are referring to.
If you are referring to [CONFIRMED] 'Category ID(s) Filter' module parameter
then there was indeed a syntax error in the patch code I had previously posted.
I have now updated this post to correct the syntax error.
I have also updated this post to include a patch download to fix this problem only.


Hello Mark and thanks so much for getting fixing this so quickly, you are indeed a sobi hero :). Sorry yes i had some trouble posting and forgot to add back a link to the bug in question. Your fixed helper file code works for me, but I noticed the code in the post is still wrong - was the first thing I tried... a comparison shows an extra )

IN ('.$this->category_filter).'))'; instead of IN ('.$this->category_filter.'))'; as in the file.

thanks again!

Greg
Country: Thailand Thailand |  OS: Windows 7/Server 2008 R2 Windows 7/Server 2008 R2 |  Browser: Firefox 7.0 Firefox 7.0 | View Profile

Tags: