Hi,
There is an issue with the script, specifically the database structure.
When trying to make a post this is the error that I receive in the interface for new post:
Oops! An error occured. Please try again later!
the php error log:
Code:
2018/06/14 15:23:29 [error] 7168#0: *6867 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'first_comment' in 'field list' in /var/www/instapost..../htdocs/app/vendor/usmanhalalit/pixie/src/Pixie/QueryBuilder/QueryBuilderHandler.php:152
Stack trace:
#0 /var/www/instapost.../htdocs/app/vendor/usmanhalalit/pixie/src/Pixie/QueryBuilder/QueryBuilderHandler.php(152): PDOStatement->execute()
After further debugging I found the reason.
The database structure is for OLD version of the nextposter. You're using some part of the code that is old and some part of the code that is new. This does NOT work!
This code is what causes the error because it is trying to insert data into 4 columns first_comment, location, media_ids and remove_media into table np_posts which do not exist. Adding these 4 columns fixes the error and posting works.
Code:
55 Query INSERT INTO `np_posts` (`id`,`status`,`user_id`,`type`,`caption`,`first_comment`,`location`,`media_ids`,`remove_media`,`account_id`,`is_scheduled`,`create_date`,`schedule_date`,`publish_date`,`is_hidden`,`data`) VALUES (NULL,'publishing','1','timeline','','','','2',0,'1',0,'2018-06-14 13:54:50','2018-06-14 13:54:50','2018-06-14 13:54:50',0,'{}')
To solve this manually add the columns with phpmyadmin, sqlscript or some GUI tool and the script will work.
Enjoy.
Thank you for sharing (little broken) script. Hopefully this will now solve all the problems, if not report and we will debug it further.