Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: New block doesn't show #1519

Open
koreus opened this issue Feb 15, 2025 · 1 comment
Open

[Bug]: New block doesn't show #1519

koreus opened this issue Feb 15, 2025 · 1 comment

Comments

@koreus
Copy link

koreus commented Feb 15, 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 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

mambax7 added a commit to mambax7/XoopsCore25 that referenced this issue Mar 10, 2025
@mambax7
Copy link
Collaborator

mambax7 commented Mar 10, 2025

Thank you for reporting and providing the Steps to Reproduce.

Please check if this PR fixes this for you: #1521

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants