Hi
I am using OJS 3.4.0.8. When adding any page or saving any page. error shows “Please select a navigation menu type. The form was not submitted properly.“
Please guide.
[06-Apr-2026 21:20:46 America/New_York] ojs2: 400 Bad Request
[06-Apr-2026 21:21:00 America/New_York] Server host "insights-journal.com.unityresearch.pk" not allowed!
[06-Apr-2026 21:21:00 America/New_York] ojs2: 400 Bad Request
[06-Apr-2026 21:21:00 America/New_York] Server host "www.insights-journal.com" not allowed!
[06-Apr-2026 21:21:00 America/New_York] ojs2: 400 Bad Request
[06-Apr-2026 21:21:01 America/New_York] Server host "insights-journal.com.unityresearch.pk" not allowed!
[06-Apr-2026 21:21:01 America/New_York] ojs2: 400 Bad Request
[06-Apr-2026 21:21:15 America/New_York] Server host "insights-journal.com.unityresearch.pk" not allowed!
[06-Apr-2026 21:21:15 America/New_York] ojs2: 400 Bad Request
[06-Apr-2026 21:21:16 America/New_York] Server host "www.insights-journal.com" not allowed!
[06-Apr-2026 21:21:16 America/New_York] ojs2: 400 Bad Request
[06-Apr-2026 21:21:16 America/New_York] Server host "insights-journal.com.unityresearch.pk" not allowed!
[06-Apr-2026 21:21:16 America/New_York] ojs2: 400 Bad Request
[06-Apr-2026 21:21:28 America/New_York] Server host "insights-journal.com.unityresearch.pk" not allowed!
[06-Apr-2026 21:21:28 America/New_York] ojs2: 400 Bad Request
[06-Apr-2026 21:21:28 America/New_York] Server host "www.insights-journal.com" not allowed!
[06-Apr-2026 21:21:28 America/New_York] ojs2: 400 Bad Request
[06-Apr-2026 21:21:28 America/New_York] Server host "insights-journal.com.unityresearch.pk" not allowed!
[06-Apr-2026 21:21:28 America/New_York] ojs2: 400 Bad Request
[07-Apr-2026 03:07:50 America/New_York] ojs2: 404 Not Found
[07-Apr-2026 05:07:50 America/New_York] ojs2: 404 Not Found
[07-Apr-2026 05:07:51 America/New_York] ojs2: 404 Not Found
[07-Apr-2026 05:07:52 America/New_York] ojs2: 404 Not Found
[07-Apr-2026 05:07:53 America/New_York] ojs2: 404 Not Found
[07-Apr-2026 05:27:45 America/New_York] ojs2: 404 Not Found
[07-Apr-2026 06:04:33 America/New_York] ojs2: 404 Not Found
Hi @a2usmani,
Please check if your host is configured properly at the setting [general].allowed_hosts, you may see it at the file config.inc.php.
Best,
Jonas Raoni
Hi
Yes allowed host has the domain of the journal. Its correct. Now Please guide???
Great! Do you still see the Server host “insights-journal.com.unityresearch.pk” not allowed on the error log after trying to save the form?
Best,
Jonas Raoni
Hi
I added this domain, though. Did I do it correctly or not? I thought adding it might solve the issue.
But it didnt, now its said
[09-Apr-2026 06:00:52 America/New_York] Server host "www.insights-journal.com" not allowed!
[09-Apr-2026 06:00:52 America/New_York] ojs2: 400 Bad Request
[09-Apr-2026 06:17:01 America/New_York] Server host "www.insights-journal.com.unityresearch.pk" not allowed!
[09-Apr-2026 06:17:01 America/New_York] ojs2: 400 Bad Request
So I removed both domains. But the error still exists. It says main domain not allowed.
Regards
Perhaps you’re not using the right format, then it can fail, it should be inside the [general] section and should look like this:
allowed_hosts = '["www.insights-journal.com.unityresearch.pk", "www.insights-journal.co"]'
Best,
Jonas Raoni
Hi
When I add this line it give me error of “400 Bad Request“. I tried one of them but it gives the same.
Please guide. I added
allowed_hosts = ‘[“www.insights-journal.com.unityresearch.pk”, “``www.insights-journal.com``”]’
There was a spelling mistake in your line , but also correcting it didnt worked.
This is a new error for me. NEver seen one
Dear @asmecher
Please help. Last error log is this. When I add the above LOC it gave Bad request error.
Then I removed it it worked fine and now I have again added it and working fine.
But the error of navigation menu still exists.
[19-Apr-2026 04:49:41 America/New_York] PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /home/unityresearch/insights-journal.com/lib/pkp/classes/security/authorization/AllowedHostsPolicy.php:59
Stack trace:
#0 /home/unityresearch/insights-journal.com/lib/pkp/classes/security/authorization/AllowedHostsPolicy.php(59): array_map('strtolower', NULL)
#1 /home/unityresearch/insights-journal.com/lib/pkp/classes/security/authorization/AuthorizationDecisionManager.php(215): PKP\security\authorization\AllowedHostsPolicy->effect()
#2 /home/unityresearch/insights-journal.com/lib/pkp/classes/security/authorization/AuthorizationDecisionManager.php(141): PKP\security\authorization\AuthorizationDecisionManager->_decidePolicySet(Object(PKP\security\authorization\PolicySet), NULL)
#3 /home/unityresearch/insights-journal.com/lib/pkp/classes/handler/PKPHandler.php(359): PKP\security\authorization\AuthorizationDecisionManager->decide()
#4 /home/unityresearch/insights-journal.com/lib/pkp/classes/core/PKPRouter.php(324): PKP\handler\PKPHandler->authorize(Object(APP\core\Request), Array, Array)
#5 /home/unityresearch/insights-journal.com/lib/pkp/classes/core/PKPPageRouter.php(278): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array, false)
#6 /home/unityresearch/insights-journal.com/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPPageRouter->route(Object(APP\core\Request))
#7 /home/unityresearch/insights-journal.com/lib/pkp/classes/core/PKPApplication.php(395): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#8 /home/unityresearch/insights-journal.com/index.php(21): PKP\core\PKPApplication->execute()
#9 {main}
thrown in /home/unityresearch/insights-journal.com/lib/pkp/classes/security/authorization/AllowedHostsPolicy.php on line 59
[19-Apr-2026 04:49:43 America/New_York] PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /home/unityresearch/insights-journal.com/lib/pkp/classes/security/authorization/AllowedHostsPolicy.php:59
Stack trace:
#0 /home/unityresearch/insights-journal.com/lib/pkp/classes/security/authorization/AllowedHostsPolicy.php(59): array_map('strtolower', NULL)
#1 /home/unityresearch/insights-journal.com/lib/pkp/classes/security/authorization/AuthorizationDecisionManager.php(215): PKP\security\authorization\AllowedHostsPolicy->effect()
#2 /home/unityresearch/insights-journal.com/lib/pkp/classes/security/authorization/AuthorizationDecisionManager.php(141): PKP\security\authorization\AuthorizationDecisionManager->_decidePolicySet(Object(PKP\security\authorization\PolicySet), NULL)
#3 /home/unityresearch/insights-journal.com/lib/pkp/classes/handler/PKPHandler.php(359): PKP\security\authorization\AuthorizationDecisionManager->decide()
#4 /home/unityresearch/insights-journal.com/lib/pkp/classes/core/PKPRouter.php(324): PKP\handler\PKPHandler->authorize(Object(APP\core\Request), Array, Array)
#5 /home/unityresearch/insights-journal.com/lib/pkp/classes/core/PKPPageRouter.php(278): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array, false)
#6 /home/unityresearch/insights-journal.com/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPPageRouter->route(Object(APP\core\Request))
#7 /home/unityresearch/insights-journal.com/lib/pkp/classes/core/PKPApplication.php(395): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#8 /home/unityresearch/insights-journal.com/index.php(21): PKP\core\PKPApplication->execute()
#9 {main}
thrown in /home/unityresearch/insights-journal.com/lib/pkp/classes/security/authorization/AllowedHostsPolicy.php on line 59
[19-Apr-2026 04:52:38 America/New_York] Server host "insights-journal.com" not allowed!
[19-Apr-2026 04:52:38 America/New_York] ojs2: 400 Bad Request
Hi
The problem was solved. I removed the following lines from htaccess file
#RewriteCond %{THE_REQUEST} \s/+index.php([^\s]) [NC]
#RewriteRule ^index.php(.)$ $1 [R=301,L]
Now website is working fine and error is resolved too. Does removing this has affect on other things?
Please guide
Thanks to all
Hi @a2usmani,
The RewriteCond and RewriteRule options are part of your mod_rewrite configuration, and outside of OJS; they are what’s responsible for removing the index.php from the URL, if that’s what you want to do.
In your post above regarding allowed_hosts, you have:
allowed_hosts = ‘[“www.insights-journal.com.unityresearch.pk”, “``www.insights-journal.com``”]’
Be careful with the mix of quote characters – you have several (‘, ', ’, “, ”, and `` – all of which are different, though they look similar).
You need to use " and ' characters, and not the other variants.
Thanks,
Alec Smecher
Public Knowledge Project Team
Hi @asmecher
Thanks for the reply. Actually when I paste here the quotation marks changes. Though I had added the line correctly.
As you can see the quotation marks are correctly placed. But when I remove this website works correctly, else it gives Bad Request error.
On the other hand If I comment out the two lines from htaccess the error of navigation menu gets solved. If I enable the two lines the website gives 404 error with no error log.
Please guide. Hoever, the issue seems to be solved but I am worried that editing htaccess file can harm the system