Skip to content

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

Closed
Closed

Description

@koreus

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

Activity

  1. added a commit that references this issue on Mar 10, 2025
  2. mambax7 commented on Mar 10, 2025

    @mambax7
    Collaborator

    Thank you for reporting and providing the Steps to Reproduce.

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

  3. added a commit that references this issue on Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions