We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Oxwall 1.8.4 cannot write a post to blog | Forum

Kimmo Kivelä
Kimmo Kivelä Dec 12 '16

I tried to write a new blog post and this is what I got:

Message:SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'id' cannot be nullFile:/srv/disk1/1746522/www/colossus.fi/ow/ow_core/database.phpLine:723Trace:#0 /srv/disk1/1746522/www/colossus.fi/ow/ow_core/database.php(723): PDOStatement->execute() #1 /srv/disk1/1746522/www/colossus.fi/ow/ow_core/database.php(476): OW_Database->execute('INSERT INTO `tu...', Array) #2 /srv/disk1/1746522/www/colossus.fi/ow/ow_core/database.php(512): OW_Database->insert('INSERT INTO `tu...', Array) #3 /srv/disk1/1746522/www/colossus.fi/ow/ow_core/base_dao.php(216): OW_Database->insertObject('tucg_blogs_post', Object(Post)) #4 /srv/disk1/1746522/www/colossus.fi/ow/ow_plugins/blogs/bol/service/post_service.php(97): OW_BaseDao->save(Object(Post)) #5 /srv/disk1/1746522/www/colossus.fi/ow/ow_plugins/blogs/controllers/save.php(314): PostService->save(Object(Post)) #6 /srv/disk1/1746522/www/colossus.fi/ow/ow_plugins/blogs/controllers/save.php(118): SaveForm->process(Object(BLOGS_CTRL_Save)) #7 [internal function]: BLOGS_CTRL_Save->index(Array) #8 /srv/disk1/1746522/www/colossus.fi/ow/ow_core/request_handler.php(250): ReflectionMethod->invokeArgs(Object(BLOGS_CTRL_Save), Array) #9 /srv/disk1/1746522/www/colossus.fi/ow/ow_core/request_handler.php(226): OW_RequestHandler->processControllerAction(Object(ReflectionMethod), Object(BLOGS_CTRL_Save)) #10 /srv/disk1/1746522/www/colossus.fi/ow/ow_core/application.php(346): OW_RequestHandler->dispatch() #11 /srv/disk1/1746522/www/colossus.fi/ow/index.php(76): OW_Application->handleRequest() #12 {main}Type:PDOException
dave Leader
dave Dec 12 '16
Please disable all third party plugins and see if that fixes the issue.  If not let us know.


It appears you have had a similar issue before. 


https://developers.oxwall.com/forum/topic/51581


This is why we ask you to disable all third party plugins. 

The Forum post is edited by dave Dec 12 '16
Kimmo Kivelä
Kimmo Kivelä Dec 12 '16
I did disable ALL plugins except "Blogs". I get this (looks same as before):

Message:SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'id' cannot be null

File:/srv/disk1/1746522/www/colossus.fi/ow/ow_core/database.php

Line:723

Trace:

#0 /srv/disk1/1746522/www/colossus.fi/ow/ow_core/database.php(723): PDOStatement->execute()

#1 /srv/disk1/1746522/www/colossus.fi/ow/ow_core/database.php(476): OW_Database->execute('INSERT INTO `tu...', Array)

#2 /srv/disk1/1746522/www/colossus.fi/ow/ow_core/database.php(512): OW_Database->insert('INSERT INTO `tu...', Array)

#3 /srv/disk1/1746522/www/colossus.fi/ow/ow_core/base_dao.php(216): OW_Database->insertObject('tucg_blogs_post', Object(Post))

#4 /srv/disk1/1746522/www/colossus.fi/ow/ow_plugins/blogs/bol/service/post_service.php(97): OW_BaseDao->save(Object(Post))

#5 /srv/disk1/1746522/www/colossus.fi/ow/ow_plugins/blogs/controllers/save.php(314): PostService->save(Object(Post))

#6 /srv/disk1/1746522/www/colossus.fi/ow/ow_plugins/blogs/controllers/save.php(118): SaveForm->process(Object(BLOGS_CTRL_Save))

#7 [internal function]: BLOGS_CTRL_Save->index(Array)

#8 /srv/disk1/1746522/www/colossus.fi/ow/ow_core/request_handler.php(250): ReflectionMethod->invokeArgs(Object(BLOGS_CTRL_Save), Array)

#9 /srv/disk1/1746522/www/colossus.fi/ow/ow_core/request_handler.php(226): OW_RequestHandler->processControllerAction(Object(ReflectionMethod), Object(BLOGS_CTRL_Save))

#10 /srv/disk1/1746522/www/colossus.fi/ow/ow_core/application.php(346): OW_RequestHandler->dispatch()

#11 /srv/disk1/1746522/www/colossus.fi/ow/index.php(76): OW_Application->handleRequest()

#12 {main}

Type:PDOException


I put the site into maintenance mode.

The Forum post is edited by Kimmo Kivelä Dec 12 '16
dave Leader
dave Dec 12 '16
Try uninstalling the blogs plugin and reinstalling.
Kimmo Kivelä
Kimmo Kivelä Dec 13 '16
OK.
Kimmo Kivelä
Kimmo Kivelä Dec 13 '16

"Before uninstalling blogs plugin we have to remove all existing user content. This may take awhile. That is why we will put the site to "maintenance mode" and activate it back upon completing the uninstall."


Does it delete blogs from database or images from server?

dave Leader
dave Dec 13 '16
Honestly im not sure about the blogs, it would be safer to back up the tables and also the images.  Just do a full backup before. 
The Forum post is edited by dave Dec 13 '16
Kimmo Kivelä
Kimmo Kivelä Dec 13 '16
Ok.
Kimmo Kivelä
Kimmo Kivelä Dec 13 '16
Installed new plugin instance. It seems to work and lets me write blogs.

In which order should I now continue, there's following things to do:


1. old blog images from backup

2. restore mysql tucg_blogs_categories, tucg_blogs_featured, tucg_blogs_post to new database

3. install advanced blogs plugin

4. customize advanced blogs settings/language 


Is this the right order?

dave Leader
dave Dec 13 '16
Yes but your issue is not with blogs, your issue is with the advanced blog plugin. Just like your other support request on this same issue every time you install that advanced blog plugin it somehow corrupts the blog plugin.   I would not install the advanced blog plugin unless you want to keep having to do this over and over.  Get the developer to fix his plugin. 


The blogs plugin works just fine, if you install that advanced blog plugin and you have issues again, please post your support request on the plugin page not here as it has nothing to do with the blog plugin.

The Forum post is edited by dave Dec 13 '16
Kimmo Kivelä
Kimmo Kivelä Dec 13 '16
OK!
iDragon Solution Co., Ltd
It was addressed.
dave Leader
dave Dec 15 '16
Thanks IDragon really appreaciate that, great job :)