Results 1 to 9 of 9

Thread: Problem when adding additional setting to module

  1. #1

    Unhappy Problem when adding additional setting to module

    I've created a module with settings and I am in the process of doing the next update. I now want to add another setting but want it displayed in the middle. I adjusted the display order of the settings that would appear below it and then created the new setting using [Add Setting] however the setting appears in the wrong order as shown in the attached image.

    To make matters more interesting I had copied the module prior to this and so there are several instances of the same varname with different grouptitles. You can see from the mysql output that one of them did get changed to 8 and it's actually the correct one. However when exporting the module the displayorder is 7 for both portal_rss_template and portal_rss_iconid though when I do an [Edit] it shows that it's already 8.
    Code:
    mysql> select * from adv_setting where grouptitle='adv_portal_rss_feed' order by displayorder;
    +-------------------------+---------------------+--------------------+--------------------+------------+--------------+
    | varname                 | grouptitle          | value              | defaultvalue       | optioncode | displayorder |
    +-------------------------+---------------------+--------------------+--------------------+------------+--------------+
    | portal_rss_feed         | adv_portal_rss_feed |                    |                    |            |            1 |
    | portal_rss_cachepath    | adv_portal_rss_feed |                    |                    |            |            2 |
    | portal_rss_cachettl     | adv_portal_rss_feed | 30                 | 30                 |            |            3 |
    | portal_rss_maxitems     | adv_portal_rss_feed | 5                  | 10                 |            |            4 |
    | portal_rss_randomize    | adv_portal_rss_feed | 0                  | No                 | yesno      |            5 |
    | portal_rss_fancy        | adv_portal_rss_feed | 0                  | No                 | yesno      |            6 |
    | portal_rss_template     | adv_portal_rss_feed | adv_portal_rss     | adv_portal_rss     |            |            7 |
    | portal_rss_iconid       | adv_portal_rss_feed |                    |                    |            |            7 |
    | portal_rss_templatebits | adv_portal_rss_feed | adv_portal_rssbits | adv_portal_rssbits |            |            8 |
    | portal_rss_qualifier    | adv_portal_rss_feed |                    |                    | textarea   |            9 |
    | portal_rss_callback     | adv_portal_rss_feed |                    |                    | textarea   |           10 |
    +-------------------------+---------------------+--------------------+--------------------+------------+--------------+
    11 rows in set (0.00 sec)
    
    mysql> select * from adv_setting where varname='portal_rss_template';
    +---------------------+----------------------+----------------+----------------+------------+--------------+
    | varname             | grouptitle           | value          | defaultvalue   | optioncode | displayorder |
    +---------------------+----------------------+----------------+----------------+------------+--------------+
    | portal_rss_template | adv_portal_rss       | adv_portal_rss | adv_portal_rss |            |            8 |
    | portal_rss_template | adv_portal_rss2      | adv_portal_rss | adv_portal_rss |            |            7 |
    | portal_rss_template | adv_portal_rss_feed  | adv_portal_rss | adv_portal_rss |            |            7 |
    | portal_rss_template | adv_portal_rss_feed2 | adv_portal_rss | adv_portal_rss |            |            7 |
    +---------------------+----------------------+----------------+----------------+------------+--------------+
    4 rows in set (0.00 sec)
    
    mysql> select * from adv_setting where grouptitle='adv_portal_rss' order by displayorder;
    +-------------------------+----------------+--------------------+--------------------+------------+--------------+
    | varname                 | grouptitle     | value              | defaultvalue       | optioncode | displayorder |
    +-------------------------+----------------+--------------------+--------------------+------------+--------------+
    | portal_rss_feed         | adv_portal_rss |                    |                    |            |            1 |
    | portal_rss_cachepath    | adv_portal_rss |                    |                    |            |            2 |
    | portal_rss_cachettl     | adv_portal_rss | 30                 | 30                 |            |            3 |
    | portal_rss_maxitems     | adv_portal_rss | 5                  | 10                 |            |            4 |
    | portal_rss_randomize    | adv_portal_rss | 0                  | No                 | yesno      |            5 |
    | portal_rss_fancy        | adv_portal_rss | 0                  | No                 | yesno      |            6 |
    | portal_rss_template     | adv_portal_rss | adv_portal_rss     | adv_portal_rss     |            |            8 |
    | portal_rss_templatebits | adv_portal_rss | adv_portal_rssbits | adv_portal_rssbits |            |            9 |
    | portal_rss_qualifier    | adv_portal_rss |                    |                    | textarea   |            9 |
    | portal_rss_callback     | adv_portal_rss |                    |                    | textarea   |           10 |
    +-------------------------+----------------+--------------------+--------------------+------------+--------------+
    10 rows in set (0.00 sec)
    mysql>
    It seems that somewhere along the line something definitely got confused about which group things belonged to.
    Tom Morris
    Porsche Boxster discussion forum.
    Today's Conservative discussion forum.

  2. #2

    Default Re: Problem when adding additional setting to module

    *** bump ***

    Any news?

  3. #3

    Default Re: Problem when adding additional setting to module

    *** bump **

  4. #4
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Problem when adding additional setting to module

    Sorry Tom. I know I saw this thread while I was out of town and *thought* I had replied to it, but apparently not. I haven't experienced any problems with settings showing up out of order and such, nor have I seen any posts from anyone else reporting a problem like that. If you would like to submit a support ticket though I'll be glad to take a look at things for you.

  5. #5

    Default Re: Problem when adding additional setting to module

    Thanks, Brian. Let me work on how to reproduce it reliably and we'll go from there.

  6. #6

    Default Re: Problem when adding additional setting to module

    Steps to duplicate ...

    Enable debug mode via the config.php file.
    Create a module and 2 additional variables with display order of 1 & 2.
    Copy the module and save it.
    Rename the new copy so it is easy to identify.
    Edit the original version and change the display order on the 2nd variable to 3.
    In the original version add a new variable, set the display order to 2 and save it.
    Save the updated module.

    On the copy, change the display order of the 2nd variable to 3.
    Now add a new variable with a display order of 2.

    Notice that it's in the wrong order from what the display order says.

    Edit the text on the 2nd variable and save it.
    Save the module.

    Look at the original module and it also contains the updated text.

    Dumping the adv_setting table shows that only the original module had its display order changed even though when editing the module it claims the display order is 3.

    Dumping the phrase table shows that only the phrase used by the copy has the updated text.

    Dumping the adv_setting table and the phrase table after deleting the original module shows that the values were not removed in either table. After also deleting the copy of the module all of the phrases and values in adv_setting still remain. If the module was exported prior to deletion and then imported after deleted there are duplicate entries in the db for adv_setting.

    The only way to clean things up is to manually go into the db and delete those records.
    Tom Morris
    Porsche Boxster discussion forum.
    Today's Conservative discussion forum.

  7. #7

    Default Re: Problem when adding additional setting to module

    Now that the holidays are over and the hangovers are starting to go away I thought I'd bump this

  8. #8

    Default Re: Problem when adding additional setting to module

    *** bump ***

    Brian,

    Any news on this and/or whether or not it was reproducible using the instructions posted?
    Tom Morris
    Porsche Boxster discussion forum.
    Today's Conservative discussion forum.

  9. #9
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Problem when adding additional setting to module

    I've been out of town for my other job since last week, so I haven't had much time on here and don't have access to my localhost to try and test things. I will be returning home this weekend though and will see if I can reproduce it then. I'll go ahead and move this to the bugs forum as well to make sure I'll see it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problem adding pages
    By gilbert in forum Troubleshooting / "How do I..." Questions
    Replies: 3
    Last Post: 11-06-2004, 04:14 PM
  2. Setting an existing vbulletin php file as a module..
    By Milorad in forum Troubleshooting / "How do I..." Questions
    Replies: 2
    Last Post: 07-15-2004, 05:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •