We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Unable to create new custom fields in existing channels / field groups.

News and General

Mandarax's avatar
Mandarax
21 posts
8 years ago
Mandarax's avatar Mandarax

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?

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

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.

       
Mandarax's avatar
Mandarax
21 posts
8 years ago
Mandarax's avatar Mandarax

H Derek,

Thanks for looking into it.

There are no add-ons installed for managing custom fields. I’ve tried creating new field groups and fields just for testing but the result is the same.

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

Are you using a custom control panel theme? When did this behavior begin?

       
Mandarax's avatar
Mandarax
21 posts
8 years ago
Mandarax's avatar Mandarax

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.

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

Can you post a screenshot of the full page of the field group, with mouseover on the Create a New Channel Field button with the target URL visible in the status bar?

       
Mandarax's avatar
Mandarax
21 posts
8 years ago
Mandarax's avatar Mandarax

The screenshot is here:

http://imgur.com/a/L7dmE

Just had to remove all of the identifying information.

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

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.

       
Mandarax's avatar
Mandarax
21 posts
8 years ago
Mandarax's avatar Mandarax

Thanks Derek.

Tried it in Chrome, Firefox, Opera on the Mac and then on Chrome on my Chromebook. Same result across the board.

I’ll setup a local copy and test that and then upgrade to EE 2.11.6

Thanks for your help.

       
Mandarax's avatar
Mandarax
21 posts
8 years ago
Mandarax's avatar Mandarax

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?

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

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.

       
Mandarax's avatar
Mandarax
21 posts
8 years ago
Mandarax's avatar Mandarax

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.

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

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.

       
Mandarax's avatar
Mandarax
21 posts
8 years ago
Mandarax's avatar Mandarax

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.

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

Great, thanks for closing the circle on that one!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.