WebsiteBaker Support (2.10.x) > General Help & Support

Error: Field 'page_code' doesn't have a default value

<< < (5/6) > >>

zirzy:

--- Quote ---the first ~20 messages show's notices about missings definitions. a SELECT collect all datas from the database table "pages" and it looks, that it not found the fields page_icon, menu_icon_0, menu_icon_1 and tooltip . Do you have this fields in database-table "pages"?? If NO, was this a upgraded WB-Version or new Install (WB 2.10.0??)
--- End quote ---
I don't have access in database in this case.. This is an upgraded WB-Version.


--- Quote ---Quote
2017-05-17T10:42:01+00:00 [E_NOTICE] /framework/functions.php:[1006] from /upgrade-script.php:[1179] load_template "Undefined variable: template_descriptio n"

the line in this message show's, a wrong configuration in one of your used templates. pls check the info.php of every template in the folder template and search for a missing line with a definition like this
Code:
$template_description  = 'Default template for Website Baker. This template is designed with one goal in mind: to completely control layout with CSS';
start with your own templates. a definition of this is missing, too long or use wrong chars or misconfigured code.
--- End quote ---
Yes, this was missing from a few of my templates, but not anymore  (Y)


--- Quote ---my private recommendation:
- delete the error.log - use the X-Button, to show the error.log and in this popup window the link to delete it
- then go to the i-Button in the top-menu, here you found the system-infos - scroll down in this window and search for the link to start the Upgrade-Script
- the info-window give's a lot of informations, maybe, you dont need the Admintool Sysinfo. if not, remove this adminTools in Addons -> Modules -> Uninstall or check Dev4me for a upgraded version
the same for the module miniform
now check the error.log again
--- End quote ---
I have installed the latest versions of these modules.. But I deleted these modules and reinstalled only Miniform. I did all these what you said and now there is no error messages even with Miniform. But the original error (when adding new page) is till there  :-(

Gast:

--- Quote ---I don't have access in database in this case.. This is an upgraded WB-Version.
--- End quote ---

use a script like this in a hidden Code section, to read the table structure from this table and search in the output for the possible missing fields page_icon, menu_icon_0, menu_icon_1 and tooltip . it will show the result in the frontend as a list with name && type of every field in the table "pages"

// Get description of settingstable
$sql = 'DESCRIBE `'.TABLE_PREFIX.'pages` ';
if ($oSettings = $database->query($sql)) {
        // Loop through settings
        while (($row = $oSettings->fetchRow(MYSQLI_ASSOC))) {
            echo "{$row['Field']} - {$row['Type']}<br />";
    }
}else{
   echo "No settings readable";
}

P.S.: Delete this Code or Code-section,if you're finish

if the fields are not part of this table, maybe you can fix it, if you start the upgrade script again, but if this not work, best solution in my eyes is "manual add" of this fields in the database or we write a little script for you

for the rest - its not the place, to discus about old error.logs. clear this log and try it again, if the error come's back, we've to talk about this with the module autor

zirzy:

--- Quote ---jacobi22:
use a script like this in a hidden Code section, to read the table structure from this table and search in the output for the possible missing fields page_icon, menu_icon_0, menu_icon_1 and tooltip . it will show the result in the frontend as a list with name && type of every field in the table "pages"

// Get description of settingstable
$sql = 'DESCRIBE `'.TABLE_PREFIX.'pages` ';
if ($oSettings = $database->query($sql)) {
        // Loop through settings
        while (($row = $oSettings->fetchRow(MYSQLI_ASSOC))) {
            echo "{$row['Field']} - {$row['Type']}<br />";
    }
}else{
   echo "No settings readable";
}
--- End quote ---


Here is the result:

page_id - int(11)
parent - int(11)
root_parent - int(11)
level - int(11)
link - text
target - varchar(7)
page_title - varchar(255)
page_icon - varchar(512)
menu_title - varchar(255)
menu_icon_0 - varchar(512)
menu_icon_1 - varchar(512)
tooltip - varchar(512)
description - text
keywords - text
page_trail - text
template - varchar(255)
visibility - varchar(255)
position - int(11)
menu - int(11)
language - varchar(5)
searching - int(11)
admin_groups - text
admin_users - text
viewing_groups - text
viewing_users - text
modified_when - int(11)
modified_by - int(11)
custom01 - varchar(255)
custom02 - varchar(255)
page_code - int(11)

Gast:
sh.... - it was my hope, the the upgrade from the older wb-version doesnt add the fields page_icon, menu_icon_0, menu_icon_1 and tooltip, but you have it.

For this error here:

--- Quote ---Field 'page_code' doesn't have a default value
--- End quote ---

we need a fix in admin/pages/add.php - i hope, it come's in the next wb-version

the same normalize for the other 4 messages

--- Quote ---2017-05-17T10:39:56+00:00 [E_NOTICE] /framework/class.frontend.php:[251] from /index.php:[65] frontend->get_page_details "Undefined index: page_icon"
2017-05-17T10:39:56+00:00 [E_NOTICE] /framework/class.frontend.php:[252] from /index.php:[65] frontend->get_page_details "Undefined index: menu_icon_0"
2017-05-17T10:39:56+00:00 [E_NOTICE] /framework/class.frontend.php:[253] from /index.php:[65] frontend->get_page_details "Undefined index: menu_icon_1"
2017-05-17T10:39:56+00:00 [E_NOTICE] /framework/class.frontend.php:[254] from /index.php:[65] frontend->get_page_details "Undefined index: tooltip"
--- End quote ---

problem is, that nobody can confirm this error - i know, you work in mysql-strict-mode and with WB 2.10.0
But whats the used PHP-version?

zirzy:
Sorry for late response..


--- Quote ---jacobi22:
But whats the used PHP-version?
--- End quote ---

PHP Version 7.0.15-0ubuntu0.16.04.4

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version