Hi All;
I can’t create/add an announcement because it’s blank, and I can’t input data into the create/add form because it gives me this error: “An unexpected error has occurred; please reload the page and try again.”
Here is the log from OJS:
Type: Illuminate\Database\QueryException
Code: HY000
Message: SQLSTATE[HY000]: General error: 1364 Field 'setting_type' doesn't have a default value (SQL: INSERT INTO announcement_settings (announcement_id, locale, setting_name, setting_value) VALUES (11, en_US, description, <p>sample</p>))
File: /home/webroot/public_html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php
Line: 671
Trace: #0 /home/webroot/public_html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback('INSERT INTO ann...', Array, Object(Closure))
#1 /home/webroot/public_html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(496): Illuminate\Database\Connection->run('INSERT INTO ann...', Array, Object(Closure))
Type: Doctrine\DBAL\Driver\PDO\Exception
Code: HY000
Message: SQLSTATE[HY000]: General error: 1364 Field 'setting_type' doesn't have a default value
Trace: #0 /home/webroot/public_html/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(115): PDOStatement->execute(NULL)
However, I did not encounter this error in our Localhost.
Best Regards;
Darryl
Hi @OJS_Darryl
I think this thread has already solved this issue you are dealing with:
Best,
Israel
Hello @israel.cefrin ;
yes! I tried this SQL Query and it fixed the problem, however I’m not sure how to apply the patch configuration. I know how to upgrade, but nothing about patching!
After that, I discovered that the content you added to the announcement is not viewable.
But, in the Settings.
Best Regards,
Darryl
Hi @OJS_Darryl
A patch is just a chunk of code that changes one or more files you have on your installation. You usually download the patch file, which might have .diff extension, to your ojs web folder or lib/pkp
directory and run from the terminal:
$ patch -p1 --dry-run < [PATCHING_FILE_NAME]
--dry-run
=> it will not change anything, but test whether the patch can be successfully applied. If you ran into no errors, then you can run the command again without this flag.
Re:empty announcements, what does it show on your browser console log?
Best,
Israel
Hello @israel.cefrin ;
$ patch -p1 --dry-run < [PATCHING_FILE_NAME]
--dry-run => it will not change anything, but test whether the patch can be successfully applied. If you ran into no errors, then you can run the command again without this flag.
Thanks for the instruction about patching. I will do that.
It works for the announcement, but without a type of announcement. As a result, I did not include the announcement types in order for my announcement to be visible on our publication journal site.
Best Regards;