Record Decision Error: An unexpected error has occurred. Please reload the page and try again

Error: An unexpected error has occurred. Please reload the page and try again.
when click Record Decision (Accept Submssion, Request Revisions, and decline).


OJS version: 3.4.0.8
Error log:
[php:notice] [pid 30124:tid 1952] [client 127.0.0.1:64450] PHP Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in …\lib\pkp\lib\vendor\slim\slim\Slim\Http\Uri.php on line 716, referer: …/index.php/JL/decision/record/25566?decision=2&reviewRoundId=4048785758619712901

Please help

Hi @denz_Ravenzle,

I think there should be a stack trace below that log entry you quoted; can you include more of the message?

Regards,
Alec Smecher
Public Knowledge Project Team

the log just looks like that:

[Wed Dec 11 09:41:58.478049 2024] [php:notice] [pid 30124:tid 1976] [client 127.0.0.1:63932] PHP Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in domain\lib\pkp\lib\vendor\slim\slim\Slim\Http\Uri.php on line 716, referer: domain/index.php/JL/decision/record/25560?decision=7
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
VirtualProtect() failed [87] The parameter is incorrect
[Wed Dec 11 09:42:02.898116 2024] [php:notice] [pid 30124:tid 1976] [client 127.0.0.1:63932] Process could not be started: The system cannot find the path specified.\r\n, referer: domain/index.php/JL/decision/record/25560?decision=7

I have tried installing using the same database on a different hosting but the error still appears

anyone please help me

Hi @denz_Ravenzle,

Hmm, that’s not the stack trace I was hoping for. You might need to temporarily modify the file in question to get it to dump out more information into the error log. If you have some basic PHP skills, change lib/pkp/lib/vendor/slim/slim/Slim/Http/Uri.php. Find the filterQuery function:

    /**
     * Filters the query string or fragment of a URI.
     *
     * @param string $query The raw uri query string.
     *
     * @return string The percent-encoded query string.
     */
    protected function filterQuery($query)
    {
        return preg_replace_callback(
            '/(?:[^a-zA-Z0-9_\-\.~!\$&\'\(\)\*\+,;=%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/',
            function ($match) {
                return rawurlencode($match[0]);
            },
            $query
        );
    }

Change it to:

    /**
     * Filters the query string or fragment of a URI.
     *
     * @param string $query The raw uri query string.
     *
     * @return string The percent-encoded query string.
     */
    protected function filterQuery($query)
    {
        if ($query === null) {
            error_log('ERROR CONDITION: ' . print_r(debug_backtrace(), true));
        }
        return preg_replace_callback(
            '/(?:[^a-zA-Z0-9_\-\.~!\$&\'\(\)\*\+,;=%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/',
            function ($match) {
                return rawurlencode($match[0]);
            },
            $query
        );
    }

Then watch the error log for the ERROR CONDITION: text to appear.

Of course, please take a complete backup before working with files on the server!

Regards,
Alec Smecher
Public Knowledge Project Team

This is the error log after editing the file lib/pkp/lib/vendor/slim/slim/Slim/Http/Uri.php :

[Thu Dec 19 19:36:17.406047 2024] [php:notice] [pid 3288:tid 1960] [client 127.0.0.1:51778] ERROR CONDITION: Array\n(\n [0] => Array\n (\n [file] => domain\lib\pkp\lib\vendor\slim\slim\Slim\Http\Uri.php\n [line] => 122\n [function] => filterQuery\n [class] => Slim\Http\Uri\n [object] => Slim\Http\Uri Object\n (\n [scheme:protected] => http\n [user:protected] => \n [password:protected] => \n [host:protected] => localhost\n [port:protected] => \n [basePath:protected] => \n [path:protected] => JL/api/v1/submissions/7102/decisions\n [query:protected] => \n [fragment:protected] => \n )\n\n [type] => → \n [args] => Array\n (\n [0] => \n )\n\n )\n\n [1] => Array\n (\n [file] => domain\lib\pkp\lib\vendor\slim\slim\Slim\Http\Uri.php\n [line] => 226\n [function] => __construct\n [class] => Slim\Http\Uri\n [object] => Slim\Http\Uri Object\n (\n [scheme:protected] => http\n [user:protected] => \n [password:protected] => \n [host:protected] => localhost\n [port:protected] => \n [basePath:protected] => \n [path:protected] => JL/api/v1/submissions/7102/decisions\n [query:protected] => \n [fragment:protected] => \n )\n\n [type] => → \n [args] => Array\n (\n [0] => http\n [1] => localhost\n [2] => \n [3] => JL/api/v1/submissions/7102/decisions\n [4] => \n [5] => \n [6] => \n [7] => \n )\n\n )\n\n [2] => Array\n (\n [file] => domain\lib\pkp\lib\vendor\slim\slim\Slim\Http\Request.php\n [line] => 137\n [function] => createFromEnvironment\n [class] => Slim\Http\Uri\n [type] => ::\n [args] => Array\n (\n [0] => Slim\Http\Environment Object\n (\n [data:protected] => Array\n (\n [MIBDIRS] => D:/WEB PROJECT/xampp8212/php/extras/mibs\n [MYSQL_HOME] => \xampp\mysql\bin\n [OPENSSL_CONF] => D:/WEB PROJECT/xampp8212/apache/bin/openssl.cnf\n [PHP_PEAR_SYSCONF_DIR] => \xampp\php\n [PHPRC] => \xampp\php\n [TMP] => \xampp\tmp\n [HTTP_HOST] => localhost\n [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0\n [HTTP_ACCEPT] => /\n [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5\n [HTTP_ACCEPT_ENCODING] => gzip, deflate, br, zstd\n [CONTENT_TYPE] => application/x-www-form-urlencoded; charset=UTF-8\n [HTTP_X_CSRF_TOKEN] => da327e431186356efd295b0272734c59\n [HTTP_X_REQUESTED_WITH] => XMLHttpRequest\n [CONTENT_LENGTH] => 399\n [HTTP_ORIGIN] => http://domain\n [HTTP_CONNECTION] => keep-alive\n [HTTP_REFERER] => http://domain/index.php/JL/decision/record/7102?decision=2&reviewRoundId=4048785758619711246\n [HTTP_COOKIE] => OJSSID=sjr5knkqm4kkseaqfj10kn3u0k\n [HTTP_SEC_FETCH_DEST] => empty\n [HTTP_SEC_FETCH_MODE] => cors\n [HTTP_SEC_FETCH_SITE] => same-origin\n [HTTP_PRIORITY] => u=0\n [PATH] => C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\dotnet\;C:\Program Files\PostgreSQL\15\bin;C:\Program Files (x86)\Bitvise SSH Client;C:\Users\DELL\AppData\Local\Microsoft\WindowsApps;\n [SystemRoot] => C:\WINDOWS\n [COMSPEC] => C:\WINDOWS\system32\cmd.exe\n [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC\n [WINDIR] => C:\WINDOWS\n [SERVER_SIGNATURE] => Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12 Server at localhost Port 80\n\n [SERVER_SOFTWARE] => Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12\n [SERVER_NAME] => localhost\n [SERVER_ADDR] => 127.0.0.1\n [SERVER_PORT] => 80\n [REMOTE_ADDR] => 127.0.0.1\n [DOCUMENT_ROOT] => D:/WEB PROJECT/xampp8212/htdocs/ojs3407\n [REQUEST_SCHEME] => http\n [CONTEXT_PREFIX] => \n [CONTEXT_DOCUMENT_ROOT] => D:/WEB PROJECT/xampp8212/htdocs/ojs3407\n [SERVER_ADMIN] => postmaster@localhost\n [SCRIPT_FILENAME] => D:/WEB PROJECT/xampp8212/htdocs/ojs3407/index.php\n [REMOTE_PORT] => 51778\n [GATEWAY_INTERFACE] => CGI/1.1\n [SERVER_PROTOCOL] => HTTP/1.1\n [REQUEST_METHOD] => POST\n [QUERY_STRING] => \n [REQUEST_URI] => /index.php/JL/api/v1/submissions/7102/decisions\n [SCRIPT_NAME] => /index.php\n [PATH_INFO] => /JL/api/v1/submissions/7102/decisions\n [PATH_TRANSLATED] => domain\JL\api\v1\submissions\7102\decisions\n [PHP_SELF] => /index.php/JL/api/v1/submissions/7102/decisions\n [REQUEST_TIME_FLOAT] => 1734611713.7391\n [REQUEST_TIME] => 1734611713\n )\n\n )\n\n )\n\n )\n\n [3] => Array\n (\n [file] => domain\lib\pkp\lib\vendor\slim\slim\Slim\DefaultServicesProvider.php\n [line] => 54\n [function] => createFromEnvironment\n [class] => Slim\Http\Request\n [type] => ::\n [args] => Array\n (\n[Thu Dec 19 19:36:17.871108 2024] [php:notice] [pid 3288:tid 1960] [client 127.0.0.1:51778] PHP Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in domain\lib\pkp\lib\vendor\slim\slim\Slim\Http\Uri.php on line 719, referer: http://domain/index.php/JL/decision/record/7102?decision=2&reviewRoundId=4048785758619711246

Hi @denz_Ravenzle,

Unfortunately it looks like the error log entry got cut off in the log file. If you’re handy with PHP, could you try a call to file_put_contents that’ll write the message to a file somewhere handy on the system (e.g. a temp folder) rather than using error_log?

Regards,
Alec Smecher
Public Knowledge Project Team

can you give an instruction? in which file and on which line should I add the file_put_contents?

There is some information that I just realized about this issue:

  1. This error appears when I upgrade to version 3.4.x, while when upgrading to the previous version (3.3.0.19) the error did not appear
  2. I have tried upgrading gradually from version 3.3.0.11 to 3.3.0.12, then to 3.3.0.19, but the error still appears on version 3.4.0.0.

Hi @denz_Ravenzle,

Modifying my instructions above – change lib/pkp/lib/vendor/slim/slim/Slim/Http/Uri.php. Find the filterQuery function:

    /**
     * Filters the query string or fragment of a URI.
     *
     * @param string $query The raw uri query string.
     *
     * @return string The percent-encoded query string.
     */
    protected function filterQuery($query)
    {
        return preg_replace_callback(
            '/(?:[^a-zA-Z0-9_\-\.~!\$&\'\(\)\*\+,;=%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/',
            function ($match) {
                return rawurlencode($match[0]);
            },
            $query
        );
    }

Change it to:

    /**
     * Filters the query string or fragment of a URI.
     *
     * @param string $query The raw uri query string.
     *
     * @return string The percent-encoded query string.
     */
    protected function filterQuery($query)
    {
        if ($query === null) {
            file_put_contents('/tmp/tmp.txt', 'ERROR CONDITION: ' . print_r(debug_backtrace(), true));
        }
        return preg_replace_callback(
            '/(?:[^a-zA-Z0-9_\-\.~!\$&\'\(\)\*\+,;=%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/',
            function ($match) {
                return rawurlencode($match[0]);
            },
            $query
        );
    }

Change the /tmp/tmp.txt part to a location where OJS has permission to store a file. Once this code is run, a file should be created there with the stack trace.

Of course, please take a complete backup before working with files on the server!

Regards,
Alec Smecher
Public Knowledge Project Team

I have added the code and adjusted the location of the tmp.txt file, but the file is not successfully created in the folder

Hi @denz_Ravenzle,

That’s probably a file permission problem, and details might be logged in the PHP error log.

Regards,
Alec Smecher
Public Knowledge Project Team

I have adjusted the file permissions before and I have also tried on localhost windows (with the same database), the tmp.txt file does not appear

Hi @denz_Ravenzle,

I’m afraid the only cause I can think of is an incorrectly specified path or a permission problem. You might see something relevant in the PHP error log.

Regards,
Alec Smecher
Public Knowledge Project Team

I have successfully generated the tmp.txt file, the file is very large (700MB), I attach the complete converted PDF file from tmp.txt and I also attach a snippet of the generated results in tmp.txt as follows:
PDF link generate tmp

ERROR CONDITION: Array
(
[0] => Array
(
[file] => D:\WEB PROJECT\xampp8212\htdocs\ojs3407\lib\pkp\lib\vendor\slim\slim\Slim\Http\Uri.php
[line] => 122
[function] => filterQuery
[class] => Slim\Http\Uri
[object] => Slim\Http\Uri Object
(
[scheme:protected] => http
[user:protected] =>
[password:protected] =>
[host:protected] => localhost
[port:protected] =>
[basePath:protected] =>
[path:protected] => JL/api/v1/submissions/7102/decisions
[query:protected] =>
[fragment:protected] =>
)
[type] => ->
[args] => Array
(
[0] =>
)
)
[1] => Array
(
[file] => D:\WEB PROJECT\xampp8212\htdocs\ojs3407\lib\pkp\lib\vendor\slim\slim\Slim\Http\Uri.php
[line] => 226
[function] => __construct
[class] => Slim\Http\Uri
[object] => Slim\Http\Uri Object
(
[scheme:protected] => http
[user:protected] =>
[password:protected] =>
[host:protected] => localhost
[port:protected] =>
[basePath:protected] =>
[path:protected] => JL/api/v1/submissions/7102/decisions
[query:protected] =>
[fragment:protected] =>
)
[type] => ->
[args] => Array
(
[0] => http
[1] => localhost
[2] =>
[3] => JL/api/v1/submissions/7102/decisions
[4] =>
[5] =>
[6] =>
[7] =>
)
)
[2] => Array
(
[file] => D:\WEB PROJECT\xampp8212\htdocs\ojs3407\lib\pkp\lib\vendor\slim\slim\Slim\Http\Request.php
[line] => 137
[function] => createFromEnvironment
[class] => Slim\Http\Uri
[type] => ::
[args] => Array
(
[0] => Slim\Http\Environment Object
(
[data:protected] => Array
(
[MIBDIRS] => D:/WEB PROJECT/xampp8212/php/extras/mibs
[MYSQL_HOME] => \xampp\mysql\bin
[OPENSSL_CONF] => D:/WEB PROJECT/xampp8212/apache/bin/openssl.cnf
[PHP_PEAR_SYSCONF_DIR] => \xampp\php
[PHPRC] => \xampp\php
[TMP] => \xampp\tmp
[HTTP_HOST] => localhost
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/201001
[HTTP_ACCEPT] => */*
[HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5
[HTTP_ACCEPT_ENCODING] => gzip, deflate, br, zstd
[CONTENT_TYPE] => application/x-www-form-urlencoded; charset=UTF-8
[HTTP_X_CSRF_TOKEN] => 402cebac0c2b76ae612c89a1d93fe159
[HTTP_X_REQUESTED_WITH] => XMLHttpRequest
[CONTENT_LENGTH] => 399
[HTTP_ORIGIN] => http://localhost
[HTTP_CONNECTION] => keep-alive
[HTTP_REFERER] => http://localhost/index.php/JL/decision/record/7102?decision=2&reviewR
[HTTP_COOKIE] => OJSSID=0h5lejolo8nuvps2c7ldpjjffb
[HTTP_SEC_FETCH_DEST] => empty
[HTTP_SEC_FETCH_MODE] => cors
[HTTP_SEC_FETCH_SITE] => same-origin
[HTTP_PRIORITY] => u=0
[PATH] => C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Pro
:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Pro
[SystemRoot] => C:\WINDOWS
[COMSPEC] => C:\WINDOWS\system32\cmd.exe
[PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
[WINDIR] => C:\WINDOWS
[SERVER_SIGNATURE] => <address>Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12 Server
[SERVER_SOFTWARE] => Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12
[SERVER_NAME] => localhost
[SERVER_ADDR] => 127.0.0.1
[SERVER_PORT] => 80
[REMOTE_ADDR] => 127.0.0.1
[DOCUMENT_ROOT] => D:/WEB PROJECT/xampp8212/htdocs/ojs3407
[REQUEST_SCHEME] => http
[CONTEXT_PREFIX] =>
[CONTEXT_DOCUMENT_ROOT] => D:/WEB PROJECT/xampp8212/htdocs/ojs3407
[SERVER_ADMIN] => postmaster@localhost
[SCRIPT_FILENAME] => D:/WEB PROJECT/xampp8212/htdocs/ojs3407/index.php
[REMOTE_PORT] => 62364
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => POST
[QUERY_STRING] =>
[REQUEST_URI] => /index.php/JL/api/v1/submissions/7102/decisions
[SCRIPT_NAME] => /index.php
[PATH_INFO] => /JL/api/v1/submissions/7102/decisions
[PATH_TRANSLATED] => D:\WEB PROJECT\xampp8212\htdocs\ojs3407\JL\api\v1\submission
[PHP_SELF] => /index.php/JL/api/v1/submissions/7102/decisions
[REQUEST_TIME_FLOAT] => 1734922105.3656
[REQUEST_TIME] => 1734922105
)
)
)
)

Hi @denz_Ravenzle,

Could you upload a compressed archive of the text file somewhere that I can access it, rather than converting it to a PDF? The PDF is hard to search for the relevant text.

Regards,
Alec Smecher
Public Knowledge Project Team

Here is the tmp.txt link:
https://drive.google.com/file/d/1GHU70mu6PvbqiXnEw3e4wi9lN97twqc1/view?usp=sharing

Hi @denz_Ravenzle,

I’m afraid you might have to get into the guts of our API routing to resolve this. Essentially you are getting an issue with our API routing framework, where the Slim microframework router used in OJS 3.4.0 is not getting the query information from the request URL.

This is being injected into the Slim container in the APIHandler class, but when Slim goes to build its representation of the URI later, ending up here, it’s getting a null query string.

Unfortunately there is something on your system that I can’t recreate here – and others with similar environments (Windows, Xampp, OJS 3.4.0-x) haven’t hit the same problem, so I think you might have to do some investigation there.

Regards,
Alec Smecher
Public Knowledge Project Team

I have tried with a different hosting environment (Centos/CWP, PHP 8), the same OJS source code (3.4.0) and the same database, but the error still appears. Is this really an error due to the upgrade? because every time I upgrade to version 3.4.x the error appears, but when I upgrade only to 3.3.0.19 the error doesn’t appear

Hi @denz_Ravenzle,

I might suggest sticking with the latest 3.3.0-x and then jumping right from there to 3.5.0-x, which uses a different library for API routing. We’re planning to release 3.5.0 in Q1 2025 anyway, and it will be our next LTS (long-term support) release, so it’ll last you well. It replaces the Slim dependency with Laravel for API routing, so won’t experience the problem.

Regards,
Alec Smecher
Public Knowledge Project Team