Skip to content

[Fix] Add tag btn URL (in empty table) & Fix error 500 SQL Column 'taxonomy_id' cannot be null#3

Open
sudwebdesign wants to merge 1 commit into
givanz:masterfrom
sudwebdesign:master
Open

[Fix] Add tag btn URL (in empty table) & Fix error 500 SQL Column 'taxonomy_id' cannot be null#3
sudwebdesign wants to merge 1 commit into
givanz:masterfrom
sudwebdesign:master

Conversation

@sudwebdesign

Copy link
Copy Markdown

To reproduce:

1 Open Products -> Tags page admin/index.php?module=content/tags&type=product&taxonomy_id=5 and click on

Screenshot 2025-06-02 at 22-49-04 Vvveb - tags - Add tag btn (zerotag)

2 Complete details and save the tag

See Stacktrace

Internal server error!
(error 500)
Column 'taxonomy_id' cannot be null
INSERT INTO taxonomy_item 
		
			( 		`taxonomy_id`,`image`,`status`  )
			
		VALUES ( :['taxonomy_item']['taxonomy_id'],:['taxonomy_item']['image'],:['taxonomy_item']['status'] )
INSERT INTO taxonomy_item 
		
			( 		`taxonomy_id`,`image`,`status`  )
			
		VALUES ( '','',1 )
Array
(
    [0] => ssd
    [1] => 
    [2] => 
    [3] => 1
)
ssd

system/db/mysqli.php on line 365
Code
throw new \Exception($message, $e->getCode()); // <==

				} else {

					error_log(print_r($stmt, 1));

					error_log($this->debugSql($sql, $params, $paramTypes));

				}

			} catch (\mysqli_sql_exception $e) {

				$message = $e->getMessage() . "\n" . $origSql . "\n" . $this->debugSql($origSql, $params, $paramTypes) . "\n" . print_r($parameters, 1) . $types;



				throw new \Exception($message, $e->getCode());	 // <==

			}

		} else {

			error_log(print_r($stmt, 1));

			error_log($this->debugSql($origSql, $params, $paramTypes));

		}




Trace
#0 storage/model/admin/categorysql.mysqli.php(1397): Vvveb\System\Db\Mysqli->execute()
#1 admin/controller/content/tag.php(52): Vvveb\Sql\CategorySQL->addCategory()
#2 [internal function]: Vvveb\Controller\Content\Tag->save()
#3 system/core/frontcontroller.php(281): call_user_func()
#4 system/core/frontcontroller.php(347): Vvveb\System\Core\FrontController::call()
#5 system/core/frontcontroller.php(417): Vvveb\System\Core\FrontController::redirect()
#6 system/core/startup.php(387): Vvveb\System\Core\FrontController::dispatch()
#7 index.php(153): Vvveb\System\Core\start()
#8 admin/index.php(41): include('...')
#9 public/admin/index.php(26): include('...')
#10 {main}

Notes:

  • To show the center Add tag button (remove all tags)
  • OR Open admin/index.php?module=content/tag (the buggy url of this button) and complete + save the tag to see the error 500

Fix error 500 and SQL Column 'taxonomy_id' cannot be null
in Vvveb/admin/controller/content/tag.php
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

Successfully merging this pull request may close these issues.

1 participant