When trying to create new fields (of any type) in existing field groups in exist channels I get an error.
Error The page you requested was not found.
The url looks like this (domain removed)
http://www.mysite.com/admin.php?/cp/admin_content/field_edit&S=452d9ccc04c50ce8afe6ed2f59701e94
ExpressionEngine 2.11.3
I haven’t seen this before, any ideas?
Your URL is missing a group_id
parameter. I’ve seen something similar when using an add-on or an extension to manage custom fields instead of using the standard tools. Are you using an add-on to manage your custom fields by chance? Or are you navigating to Admin > Channel Administration > Channel Fields? That will take you to a field group, and list all existing fields. The Create a New Channel Field button there would include the group_id
for the field group currently being viewed.
No custom CP theme either.
Saw the behaviour first a few days ago. I hadn’t worked on the site in a week or so - it was previously working as expected.
My server has been upgraded recently but this behaviour is only affecting one specific site, I’ve run tests on 5 or 6 other sites and they are all working as expected.
Yep, that looks correct, notice that the target URL includes &group_id=8
. But when you click that you are being redirected to a URL without that parameter? What happens if you cut and paste that link into a new browser tab? There’s definitely some external action taking place to modify your URL, but hard to identify remotely. Another gut check would be seeing if this behavior is consistent across different browsers.
Hi Derek,
I setup a local copy using MAMP Pro to test the behaviour and the field was created as expected with no issues. I then upgraded the installation to the latest 2.X version - 2.11.6 and again all worked correctly.
However when I uploaded the site back to my server,a brand new clean account on my VPS the same thing happened again i.e. I cannot create new fields as the group ID is not being included in the url.
This would suggest that it’s a server issue. Do you have any pointers that I can take to my hosting company as to what may cause urls to be modified like this?
Thanks.
UPDATE: I ran the EE Compatibility Wizard on the server and the only red flag was the one for URL Segment Support. Could that be part of the problem?
Hi Mandarax,
I’ve never seen a server arbitrarily remove /redirect away from specific GET parameters. mod_security can filter for those, but I’ve only ever seen those end in a server error, not a rewritten/redirected URL. While it’s ideal if your server supports URL segments fully, it’s not a requirement. It is a red flag, but only a small one. 😊
Can you confirm that cutting and pasting with that URL “lands” you on the same URL but without group_id
? And that you don’t have any other issues in your control panel? If that’s the case, you should be able to create an isolation test to show to the host. An external PHP file, with:
<?php
if ( ! empty($_GET))
{
var_dump(array_keys($_GET));
}
else
{
Echo "GET is empty";
}
Access it via https://example.com/test.php?foo=bar&group_id=2&bat=bag, which would demonstrate the problem outside of ExpressionEngine. That is of course only if you see the same behavior in the ExpressionEngine control panel, and aren’t having any other issues.
Thanks Derek.
I used that PHP test as you described and the result returned was:
array(3) { [0]=> string(3) "foo" [1]=> string(8) "group_id" [2]=> string(3) "bat" }
Copying the url from the “Create a New Channel Field” button lands me on the correct filed creation page and the group id is within the url. However it’s when the page is submitted that the error occurs.
Something strange must be occurring on your server, but at this point we’d need to look directly to be able to give guidance. If you’d like us to do that, please submit a support ticket and include login information via the secure private portal.
Hi Derek,
My hosting company finally got to the bottom of the issue and were able to fix it. I thought I’d post it here for reference.
I just wanted to update you that I am now able to add a field in the expression engine. I found that the CMS was being blocked by modsecurity. I have whitelisted the rules that were preventing it from loading, and created a custom php.ini file, to remove the opcache extension that seemed to be causing a conflict.
Thanks again for your help, this was really frustrating issue.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.