You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried a to create a new block in system admin using the "Add Block" button.
It works, but it doesn't show on main page.
I may found the bug.
The block is created with mid=0 in newblocks table.
But the SQL to fetch the blocks needs that the mid=0 exist in modules table. And my modules table doesn't have a mid=0 row
Here the SQL :
SELECT b.* FROM newblocks b JOIN block_module_link m ON m.block_id = b.bid JOIN modules mo ON mo.mid = b.mid WHERE b.isactive =1 AND mo.isactive =1 AND b.visible=1 AND m.module_id IN (0,3,-1) AND b.bid IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31) ORDER BY b.weight, m.block_id
JOIN modules mo ON mo.mid = b.mid is the problem here
Steps to Reproduce
Go to modules/system/admin.php?fct=blocksadmin , click on "Add Block" button, fill the field, make the block visible and submit.
Go on index page, and the new block doesn't show
The text was updated successfully, but these errors were encountered:
mambax7
added a commit
to mambax7/XoopsCore25
that referenced
this issue
Mar 10, 2025
XOOPS Version
2.5.12
PHP Version
8.2, 8.3
Operating System
Linux
Description
Hi,
I tried a to create a new block in system admin using the "Add Block" button.
It works, but it doesn't show on main page.
I may found the bug.
The block is created with
mid=0
innewblocks
table.But the SQL to fetch the blocks needs that the mid=0 exist in
modules
table. And my modules table doesn't have a mid=0 rowHere the SQL :
SELECT b.* FROM newblocks b JOIN block_module_link m ON m.block_id = b.bid JOIN modules mo ON mo.mid = b.mid WHERE b.isactive =1 AND mo.isactive =1 AND b.visible=1 AND m.module_id IN (0,3,-1) AND b.bid IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31) ORDER BY b.weight, m.block_id
JOIN modules mo ON mo.mid = b.mid
is the problem hereSteps to Reproduce
Go to modules/system/admin.php?fct=blocksadmin , click on "Add Block" button, fill the field, make the block visible and submit.
Go on index page, and the new block doesn't show
The text was updated successfully, but these errors were encountered: