Author:
Makenosound
Version:
1.1
Released:
18 March 2011
Category:
Interface

Closed#1: Incorrect section at preferences

I have the following scenario:

I have a section called ‘Pages’ and a section called ‘News’.

I create 6 shortcuts with the following setup:

Label: English
Link: ?filter=language:en
Section: Pages

Label: Dutch
Link: ?filter=language:nl
Section: Pages

Label: German
Link: ?filter=language:de
Section: Pages

Label: English
Link: ?filter=language:en
Section: News

Label: Dutch
Link: ?filter=language:nl
Section: News

Label: German
Link: ?filter=language:de
Section: News

When I save these settings, they get properly saved in the database and everything works fine.

BUT…

When I look in my preferences, the lower 3 shortcuts also have the field ‘Pages’ instead of ‘News’. Probably something goes wrong with setting the selected-attribute for the correct option here.

The result is: If I save my preferences again, my shortcuts get saved wrong (settings all fields to ‘Pages’ because the selected-attribute is positioned wrong).

How odd. I can’t reproduce this bug. You still having the problem?

I had this issue today again. I don’t know why, but on line 172 of extension.driver.php multiple options are set to true.

I hot-fixed this by adding $option[1] = false; before this line, so the complete code looks like:

# Set selected
foreach($options as &$option)
{
    $option[1] = false;
    if ($option[0] == $shortcut['section_id']) $option[1] = true;
}

Don’t exactly know why it was causing this bug. Perhaps it has something to do with PHP-pointers?

This issue is closed.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details