Hi,
generic error are showed when I try to unpublish publication in OJS (3.4.0.3). In apache error log I found this message:
[php:notice] [pid 7296:tid 1856] [client ::1:50631] Slim Application Error:\r\nType: Error\r\nMessage: Class "Transliterator" not found\r\nFile: C:\\xampp_latest\\htdocs\\OJS\\lib\\pkp\\classes\\oai\\OAIUtils.php\r\nLine: 30\r\n
However when I check a file (OAIUtils), I noticed that Translate class is already included:
use Transliterator;
class OAIUtils
{
private static $TO_ASCII;
private static $NOT_IN_URI_NON_RESERVED_CHARS = '/[^A-Za-z0-9\-_\.!~*\'()]/';
public static function init()
{
self::$TO_ASCII = Transliterator::createFromRules(':: Any-Latin; :: Latin-ASCII; :: NFD; :: [:Nonspacing Mark:] Remove; :: NFC;', Transliterator::FORWARD);
}
Can you help me with this issue? Thank you.
Hi @sergej.papper,
Is it possible that the PHP intl
extension is not installed? The Transliterator
class should be built into PHP with that extension.
Regards,
Alec Smecher
Public Knowledge Project Team
Yes, I added âextension=php_intl.dllâ to my php.ini and error disappeared. However, others errors are came. For example: âgetLocalizedAbbrev():stringâ (classes/section/Section.php) canât return null and so on. After some tweaks (like âgetLocalizedAbbrev():string|nullâ) I finally got this error message:
Slim Application Error:\r\nType: Illuminate\Database\QueryException\r\nCode: 23000\r\nMessage: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'set_name' cannot be null (SQL: INSERT INTO data_object_tombstones\n\t\t\t\t(data_object_id, date_deleted, set_spec, set_name, oai_identifier)\n\t\t\t\tVALUES\n\t\t\t\t(4899, '2024-03-14 07:25:18', archaeologia-lituana, ?, oai:ojs.www4063.vu.lt:article/4899))\r\nFile: C:\xampp_latest\htdocs\OJS\lib\pkp\lib\vendor\laravel\framework\src\Illuminate\Database\Connection.php\r\nLine: 760
Maybe you can help me with this error? What is data_object_tombstones table and why set_name column is null in this case?
Hi @sergej.papper,
The data_object_tombstones
table (from schema documentation) stores:
Entries for published data that has been removed. Usually used in the OAI endpoint.
When you unpublish a piece of content, it gets a tombstone, so that the OAI interface can send out a list of deleted records to other systems that need to know about it.
You mention two other issues:
For example: âgetLocalizedAbbrev():stringâ (classes/section/Section.php) canât return null
âŠandâŠ
Column âset_nameâ cannot be null
I think both of these have the same underlying cause, and itâs actually a data problem rather than a code issue. Is it possible that you have submissions in your system that arenât assigned to a section? Try:
SELECT p.* FROM publications p LEFT JOIN sections s ON (p.section_id = s.section_id) WHERE s.section_id IS NULL;
You should get an empty result.
Regards,
Alec Smecher
Public Knowledge Project Team
Thanks for you help. I finally found the source of the problem.
For some reason there was a âghostâ sections rows in sections table which donât have related rows in section_settings table (where section abbrev and name are specified). As a result everything is crushed.
I have inserted a related rows in section_settings and everything works fine now.
Once again, thank you for your help. Topic can be closed now.
1 Like