21
sskhalid
Re: "Module for your Start Page" error Pls help before I go nuts!!!
  • 2006/4/23 10:17

  • sskhalid

  • Just popping in

  • Posts: 24

  • Since: 2006/4/18


Any other takers ? Especially 2.2.4 gurus ! If I can only find out what the query means (the example I posted) or if there is a way to change it. I need to know the semantics of the module selection query (so maybe this is not the right forum to post in).

I've seen other module selection queries people have posted and they are similar to what is being executed in my local environment (but not on the hosted server).



22
sskhalid
Top Page/Starting Module bug?
  • 2006/4/22 21:42

  • sskhalid

  • Just popping in

  • Posts: 24

  • Since: 2006/4/18


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. www.mysite.com/index.php (then redirects to the starting module, say, private messaging module 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.



23
sskhalid
Re: "Module for your Start Page" error Pls help before I go nuts!!!
  • 2006/4/22 12:13

  • sskhalid

  • Just popping in

  • Posts: 24

  • Since: 2006/4/18


Quote:

jensclas wrote:

First of all don't reinstall - yet at least. There is sure to be something....which XOOPS are we dealing with here? 2.0 or 2.2?


Hi m8.

I am using:

IIS
Windows NT
MySQL 5.0.X
Xoops 2.2.4

Quote:

You say any 'other' module - which one are you using that is the one that does work??? Which one is your starting module?


Ok, here is what happens.

In general settings, if I don't set any Start Module, all modules appear on the site (Left/Right etc) whether they are Top Page or All Front Side Page modules.

If I set *ANY* module e.g. news or CBB etc. in the general settings as the starting module, the Top Page modules do not appear when I go to www.mysite.com (it does redirect to the starting module as expected. In my local dev box I can see the top page modules AND the starting module at the SAME time.)

Quote:

Second of all - do the time consuming double check - check the permission and access settings on each and every module...you might find the change the other webmasters made there.


I've gone beyond this - for the testing I am only using 'Who's online' block from the built in system module. Am setting the CBB (newbb) as starting module. I've checked all permissions, config settings etc.

Quote:

make sure all 'blocks' you want visible in top page have the yes radio button not the no - do this in blocks admin not general preferences.


Don't think there is an option to set the visibility in the general settings area. Yep, done the Yes/No check a number of times in the Blocks->List All Blocks area.

Cheers



24
sskhalid
"Module for your Start Page" error Pls help before I go nuts!!! - UPDATED
  • 2006/4/22 10:05

  • sskhalid

  • Just popping in

  • Posts: 24

  • Since: 2006/4/18


Hi,

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, 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 - there are two other webmasters and I think one of them messed up something and is not telling me what happened.

Would appreciate some help.

Thanks

EDIT2: I bit the bullet, deleted the database, reinstalled XOOPS , reinstalled PHP5.1.2 and it still does not work :(


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):

(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.




TopTop
« 1 2 (3)



Login

Who's Online

219 user(s) are online (143 user(s) are browsing Support Forums)


Members: 0


Guests: 219


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits