6.0.0-beta1
8/7/25

[#5033] Current SQL scripts won't allow forum creation (invalid NOT NULL fields)
Summary Current SQL scripts won't allow forum creation (invalid NOT NULL fields)
Queue Agora
Type Bug
State Resolved
Priority 1. Low
Owners
Requester nilskaiser (at) gmx (dot) net
Created 02/24/2007 (6739 days ago)
Due
Updated 02/24/2007 (6739 days ago)
Assigned
Resolved 02/24/2007 (6739 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
02/24/2007 10:01:31 PM Chuck Hagenbuch Comment #2
State ⇒ Resolved
Reply to this comment
Committed, thanks!
02/24/2007 06:14:18 PM nilskaiser (at) gmx (dot) net Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Current SQL scripts won't allow forum creation (invalid NOT NULL fields)
Queue ⇒ Agora
New Attachment: agora.sql.patch Download
Reply to this comment
The forum creation process first inserts a forum setting only some of 
the fields:



Messages.php - line 1903

         $sql = 'INSERT INTO agora_forums (forum_id, scope, 
forum_name, active, author) VALUES (?, ?, ?, ?, ?)';



The other fields are set in a following update statement:



Messages.php - line 1937

         $sql = 'UPDATE agora_forums SET forum_name = ?, forum_parent_id = ?, '

             . 'forum_description = ?, forum_moderated = ?, '

             . 'forum_attachments = ? WHERE forum_id = ?';



The current sql scripts set all fields to NOT NULL, which causes a db 
error on creation.



Patch submitted.

Saved Queries