[geeklog-devel] Odd upgrade error

Tom websitemaster at cogeco.net
Mon Mar 5 12:42:53 EST 2012


I think I figured out the upgrade problem.

In the first version of upgrading the plugin (1.1.0),
plugin_initconfig_spamx gets run which inserts all config options (same
thing that is used for new installs).

After this the $current_config flag gets set to true which should bypass all
spamx_update_ConfValues_x_x_x and spamx_update_ConfigSecurity_x_x_x type
functions.

There are 2 problems I see. 

First off spamx_update_ConfigSecurity_x_x_x function should always be run
since these deal with the features and access to the tabs.

Secondly, anything that touches the conf_values table has to be executed in
the spamx_update_ConfValues_x_x_x functions and not included in the normal
$_UPDATES array for general plugin table changes. This here was how the sql
statement 

UPDATE {$_TABLES['conf_values']} SET tab = fieldset WHERE group_name =
'spamx 

was run on already updated config values.

This problem is also in the other core plugins. It may take a bit (I am busy
at work) but I will fix the problem. Does anyone else want to handle these
other feature requests  then?

Update Page Navigation with link elements
http://project.geeklog.net/tracking/view.php?id=1391

The part of the page navigator should do markup by a list.
http://project.geeklog.net/tracking/view.php?id=1422

Failure when trying to report sitemap.xml write error (I am not sure if this
happens on a Windows system since I have not seen it before)
http://project.geeklog.net/tracking/view.php?id=1412

Thanks

Tom



-----Original Message-----
From: geeklog-devel-bounces at lists.geeklog.net
[mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Tom
Sent: March-04-12 4:47 PM
To: 'Geeklog Development'
Subject: Re: [geeklog-devel] Odd upgrade error

I had a quick look at the problem (my son is sick so I couldn't really dig
much deeper) and it is not limited to the spamx plugin. The polls and
calendar plugin suffer a similar problem when their dynamic block tabs get
added.

I will refer to the spamx plugin but the others is probably the same problem
since the upgrade process is similar.

In Spam-X 1.2.1 the upgrade runs the line 

"UPDATE {$_TABLES['conf_values']} SET tab = fieldset WHERE group_name =
'spamx'",

This was to fix the problem when Geeklog went from no tabs in the
configuration to tabs (1.7.2 to 1.8.0) and Geeklog actually does the same
thing with the core configuration options. 

Then in Spam-X 1.2.2 we add in the new tabs and fieldsets for the modules
(the fieldset and tab numbers actually are different for this update). When
I look at the migrated pre 1.5 db this new tab and fieldset share the same
value, they shouldn't. 

Somehow it looks like maybe either that Spam-X 1.2.1 line ran after the
1.2.2 upgrade (I do not see how) or maybe an update gets run (ie UPDATE
{$_TABLES['conf_values']} SET tab = fieldset) without a where clause that
sets all tabs to equal fieldsets at some point after the upgrade of these
plugins.  I check the other plugins and they all seem to specify the proper
group_name when their upgrade process is run so I am not sure...

Tom




-----Original Message-----
From: geeklog-devel-bounces at lists.geeklog.net
[mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Dirk Haun
Sent: March-04-12 1:54 PM
To: Geeklog Development
Subject: [geeklog-devel] Odd upgrade error

Here's an odd upgrade error that I couldn't figure out:

When migrating a pre-1.5.0 database to 1.9.0, the new "SFS" entries for the
Spam-X configuration don't end up where they are supposed to be. I.e. they
end up on the "Spam-X Main Settings" tab instead of the "Modules" tab. Also,
the Modules tab is actually called "Main".

I have no idea why that happens. The add() calls all specify 10 for the tab.
It works when upgrading a 1.5.0 or later database. I've logged the SQL
requests that insert the SpamX config entries and they all use tab 10 where
you would expect it. Yet once the install is through, I get:

| name               | value | type     | group_name | default_value |
subgroup | selectionArray | sort_order | tab  | fieldset |
+--------------------+-------+----------+------------+---------------+--
+--------------------+-------+----------+------------+---------------+--
+--------------------+-------+----------+------------+---------------+--
----+----------------+------------+------+----------+
| tab_modules        | N;    | tab      | spamx      | N;            |
0 |             -1 |          0 |    0 |        0 |
| fs_sfs             | N;    | fieldset | spamx      | N;            |
0 |             -1 |          0 |    0 |        0 |
| sfs_enabled        | b:1;  | select   | spamx      | b:1;          |
0 |              1 |         10 |    0 |        0 |
| fs_snl             | N;    | fieldset | spamx      | N;            |
0 |             -1 |          0 |   10 |       10 |
| snl_enabled        | b:1;  | select   | spamx      | b:1;          |
0 |              1 |         10 |   10 |       10 |
| snl_num_links      | i:5;  | text     | spamx      | i:5;          |
0 |             -1 |         20 |   10 |       10 |

Anyone have any ideas (or better debugging-fu than I seem to have today)?

bye, Dirk


--
http://www.themobilepresenter.com/

_______________________________________________
geeklog-devel mailing list
geeklog-devel at lists.geeklog.net
http://eight.pairlist.net/mailman/listinfo/geeklog-devel

_______________________________________________
geeklog-devel mailing list
geeklog-devel at lists.geeklog.net
http://eight.pairlist.net/mailman/listinfo/geeklog-devel




More information about the geeklog-devel mailing list