Hi,
I am using XOOPS 2.2.4/MySQL4.1/IIS/Win2003/PHP 5.1.2
Sorry if I am cross posting, but this bug is the ONLY show stopper and I don't know where the conflict is. It's a very embarrasing situation for me as I suggested using XOOPS instead of a regular php website.
Can someone please help me before I go crazy ? I am just on the verge of uninstalling everyting and reinstalling php + XOOPS + MySQL as I can't find out where the problem is.
Ok here is the problem.
In Preferences -> System -> General Settings, if I set any other module e.g. CBB or News as the 'Module for your start page', all modules which are set to 'Visible in->Top Page' do not appear. If I remove the starting module in general settings, they appear again.
The used to work ok (E.g. Top Page modules and starting module content appearing at same time) but I don't know what happened and it suddenly started giving me this problem. One day I logged on and all the top page modules disappeared.
Would appreciate some help.
Thanks
P.S. Apologies if I am cross posting, but I just realised that the forum I posted in was relavant, but that's not the case as people there are unable to help me.
EDIT2: I bit the bullet, deleted the database, reinstalled XOOPS , reinstalled PHP and it still does not work with a clean install and minimum website:(
EDIT1: Found some more clues... XOOPS is executing different queries for the same configuration (dev box/server).
I've been doing some debugging and I find it strange that with identical version of XOOPS (local/server), the queries are different. WIth same number of modules on each site (same config, module visibility, layout etc) XOOPS is executing different queries. When I changed the page visibility/position (Top Page/All Frontside pages) the data is being updated correctly in both cases (local/server). I just don't know what's corrupted the sql queries on the server.
I've attached the debug files for your reference. An example is the module selection query (ignore table names and block instance ids e.g. 16,2,3,14) executed when the index page of my website is loaded .e.g.
http://www.mysite.com/index.php (then redirects to the starting module, say, private messaging module
http://www.mysite.com/modules/pm/viewpmsg.php)
(Server Website)
SELECT DISTINCT i.instanceid, b.*, i.* FROM xoops_block_instance i, xoops_newblocks b, xoops_block_module_link m WHERE m.block_id=i.instanceid AND i.instanceid IN (16,2,3,14) AND i.visible=1 AND i.bid=b.bid AND b.isactive=1 AND
( (m.module_id=0 AND m.pageid=0) OR (m.module_id=8 AND m.pageid IN (0,0)) ) ORDER BY i.weight,i.instanceid
(Local Website)
SELECT DISTINCT i.instanceid, b.*, i.* FROM BToec_block_instance i, BToec_newblocks b, BToec_block_module_link m WHERE m.block_id=i.instanceid AND i.instanceid IN (1,2,3,11) AND i.visible=1 AND i.bid=b.bid AND b.isactive=1 AND
m.module_id=0 AND m.pageid IN (0, 1) ORDER BY i.weight,i.instanceid
Full debug files below:
-------------------------------------------------------
(Server Website)
Queries core
SELECT * FROM xoops_config WHERE (conf_modid = '1' AND conf_catid = '1') ORDER BY conf_order ASC
SELECT sess_data FROM xoops_session WHERE sess_id = 'eg5eh8su84g20acsp1c3a2vcj7'
( 0.00046)
SELECT * FROM xoops_users u, xoops_user_profile p WHERE u.uid = p.profileid AND uid = '1' LIMIT 0, 1
( 0.000787)
SELECT * FROM xoops_modules WHERE dirname = 'AMS'
( 0.000584)
SELECT * FROM xoops_config WHERE (conf_modid = '8') ORDER BY conf_order ASC
( 0.001186)
SELECT * FROM xoops_config WHERE (conf_modid = '1' AND conf_catid = '3') ORDER BY conf_order ASC
( 0.000876)
SELECT * FROM xoops_group_permission WHERE (gperm_modid = '1' AND gperm_name = 'block_read' AND gperm_groupid IN (1,2))
( 0.000736)
SELECT DISTINCT i.instanceid, b.*, i.* FROM xoops_block_instance i, xoops_newblocks b, xoops_block_module_link m WHERE m.block_id=i.instanceid AND i.instanceid IN (16,2,3,14) AND i.visible=1 AND i.bid=b.bid AND b.isactive=1 AND ( (m.module_id=0 AND m.pageid=0) OR (m.module_id=8 AND m.pageid IN (0,0)) ) ORDER BY i.weight,i.instanceid
( 0.004236)
SELECT * FROM xoops_xoopsnotifications WHERE (not_modid = '8' AND not_category = 'global' AND not_uid = '1')
( 0.001031)
SELECT * FROM xoops_modules WHERE mid = 8
( 0.000456)
Total Number of Queries: 10 | Total SQL Generation Time: 0.010352
Queries module
SELECT * FROM xoops_ams_article n, xoops_ams_text t, xoops_ams_audience a WHERE t.storyid=n.storyid AND n.audienceid=a.audienceid AND published > 0 AND published <= 1145706586 AND (expired = 0 OR expired > 1145706586) AND ihome=0 AND t.current=1 ORDER BY published DESC LIMIT 0, 5
( 0.001984)
SELECT * FROM xoops_ams_topics ORDER BY weight
( 0.000776)
SELECT * FROM xoops_users u, xoops_user_profile p WHERE u.uid = p.profileid AND uid IN (2,1)
( 0.000914)
SELECT * FROM xoops_smiles
( 0.000575)
SELECT COUNT(*) FROM xoops_ams_article WHERE published > 0 AND published <= 1145706586 AND (expired = 0 OR expired > 1145706586) AND ihome=0
( 0.000495)
Total Number of Queries: 5 | Total SQL Generation Time: 0.004744
Queries block
SELECT * FROM xoops_modules WHERE (hasmain = '1' AND isactive = '1' AND weight > '0') ORDER BY weight ASC
( 0.000832)
SELECT * FROM xoops_group_permission WHERE (gperm_modid = '1' AND gperm_name = 'module_read' AND gperm_groupid IN (1,2))
( 0.000945)
SELECT * FROM xoops_modules WHERE dirname = 'pm'
( 0.000586)
SELECT COUNT(*) FROM xoops_priv_msgs WHERE (read_msg = '0' AND to_userid = '1')
( 0.000951)
Total Number of Queries: 4 | Total SQL Generation Time: 0.003314
Blocks
Main Menu: (2 Queries) No Cache
User Menu: (2 Queries) No Cache
Total: 2 blocks
Execution Time
XOOPS took 0.66399693489075 seconds to load.
-------------------------------------------------------
(Local)
Queries core
SELECT * FROM BToec_config WHERE (conf_modid = '1' AND conf_catid = '1') ORDER BY conf_order ASC
SELECT sess_data FROM BToec_session WHERE sess_id = '2578757c4752461ded09257a707a3e0c'
( 0.001839)
SELECT * FROM BToec_users u, BToec_user_profile p WHERE u.uid = p.profileid AND uid = '1' LIMIT 0, 1
( 0.002474)
SELECT * FROM BToec_modules WHERE dirname = 'AMS'
( 0.003131)
SELECT * FROM BToec_config WHERE (conf_modid = '13') ORDER BY conf_order ASC
( 0.003504)
SELECT * FROM BToec_config WHERE (conf_modid = '1' AND conf_catid = '3') ORDER BY conf_order ASC
( 0.002587)
SELECT * FROM BToec_group_permission WHERE (gperm_modid = '1' AND gperm_name = 'block_read' AND gperm_groupid IN (1,2))
( 0.00244)
SELECT DISTINCT i.instanceid, b.*, i.* FROM BToec_block_instance i, BToec_newblocks b, BToec_block_module_link m WHERE m.block_id=i.instanceid AND i.instanceid IN (1,2,3,11) AND i.visible=1 AND i.bid=b.bid AND b.isactive=1 AND m.module_id=0 AND m.pageid IN (0, 1) ORDER BY i.weight,i.instanceid
( 0.010789)
SELECT * FROM BToec_xoopsnotifications WHERE (not_modid = '13' AND not_category = 'global' AND not_uid = '1')
( 0.001691)
SELECT * FROM BToec_modules WHERE mid = 13
( 0.002007)
Total Number of Queries: 10 | Total SQL Generation Time: 0.030462
Queries module
SELECT * FROM BToec_group_permission WHERE (gperm_modid = '13' AND gperm_name = 'ams_view' AND gperm_groupid IN (1,2))
( 0.00222)
SELECT * FROM BToec_ams_article n, BToec_ams_text t, BToec_ams_audience a WHERE t.storyid=n.storyid AND n.audienceid=a.audienceid AND published > 0 AND published <= 1145706287 AND (expired = 0 OR expired > 1145706287) AND ihome=0 AND t.current=1 ORDER BY published DESC LIMIT 0, 5
( 0.002367)
SELECT COUNT(*) FROM BToec_ams_article WHERE published > 0 AND published <= 1145706287 AND (expired = 0 OR expired > 1145706287) AND ihome=0
( 0.001505)
Total Number of Queries: 3 | Total SQL Generation Time: 0.006092
Queries block
SELECT * FROM BToec_modules WHERE dirname = 'pm'
( 0.005413)
SELECT * FROM BToec_modules WHERE (hasmain = '1' AND isactive = '1' AND weight > '0') ORDER BY weight ASC
( 0.00279)
SELECT * FROM BToec_group_permission WHERE (gperm_modid = '1' AND gperm_name = 'module_read' AND gperm_groupid IN (1,2))
( 0.003067)
SELECT gperm_itemid FROM BToec_group_permission LEFT JOIN BToec_modules m ON gperm_modid=m.mid WHERE m.dirname='myalbum' AND gperm_name='myalbum_global' AND (gperm_groupid IN (1,2))
( 0.002468)
DELETE FROM BToec_online WHERE online_updated < 1145705987
( 0.001402)
SELECT COUNT(*) FROM BToec_online WHERE online_uid=1
( 0.001442)
UPDATE BToec_online SET online_updated=1145706287, online_module = 13 WHERE online_uid = 1
( 0.001324)
SELECT * FROM BToec_online
( 0.015782)
SELECT COUNT(*) FROM BToec_online WHERE online_module = '13'
( 0.001593)
Total Number of Queries: 9 | Total SQL Generation Time: 0.035281
Blocks
User Menu: (1 Queries) No Cache
Main Menu: (3 Queries) No Cache
Who's Online: (5 Queries) No Cache
Total: 3 blocks
Execution Time
XOOPS took 1.4016430378 seconds to load.