ERROR after update

I just installed the new version and while it works great, there is now a message at the top of the screen …
Database error 1364 while doing query Field ‘id’ doesn’t have a default value

Is this something I can add or fix? Looks like an SQL issue but can’t be certain. It shows up under the heading on almost every page I view.

Thanks team,
Doug

@Dougster If you view the html source of the page the actual error message might be clearer.

It says it will work better with Javascript on. But I thought it was. Am I still missing something?

@Dougster I mean the error message that you showed in the first post about a database error.

Please copy the actual html, and use the code button </> to display it as plain text.

Hopefully it will take this as text:

<h4 class="pagetitle">Dashboard</h4><div class="hidden"><a href="./?page=home&amp;tk=d1af0c5e53fa6f9de7352266d2c7f9d3" title="Go to the dashboard page">Dashboard</a></div><noscript><div class="note d533fc9acf638d1"><a href="./?page=home&amp;action=hidenote&amp;note=d533fc9acf638d1" class="hide ajaxable" title="Close this box">Hide</a><p>phpList will work without Javascript, but it will be easier to use if you switch it on.</p></div></noscript><div id="dberror">Database error 1364 while doing query  Field 'id' doesn't have a default value</div><div class="row">

That better??

Doug

Ok but no further information. Can you edit file admin/mysqli.inc

line 179 should be

$result = mysqli_query($GLOBALS['database_connection'], $query);

add this just before that line

$GLOBALS['lastquery'] = $query;

That should cause the query to be included in the error message.

YUP:

Database error 1364 while doing query insert into phplist_urlcache (url,lastmodified,added,content) values("https://download.phplist.org/version.json?version=3.5.9",1608319195,now(),"{\n \"name\": \"phpList3\",\n \"version\": \"3.5.9\",\n \"versionstring\": \"phpList 3.5.9\" ,\n \"url\":\"https://download.phplist.org/phplist.zip\"\n}\n") Field 'id' doesn't have a default value

@Dougster Can you use phpmyadmin or a similar program to look at the database. There seems to be a problem with the table phplist_urlcache. Look for the id column. It should be like this

Here is mine:

Does TYPE need to be int(11)? How do I turn AUTO_INCREMENT on?

@Dougster The id column needs to be defined as auto increment. Not sure why it is not.
You can use the Change link to edit the definition. There is a check box labelled “A I” that needs to be checked.

1 Like

Perfect … the error is gone. I’ll remove that debug or maybe just remark it out for now.

Thanks again, you guys are the best.

Doug

2 Likes