Thread

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

February 18, 2017 6:58am

Subscribe [2]
  • #1 / Feb 18, 2017 6:58am

    Mandarax

    18 posts

    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?

  • #2 / Feb 20, 2017 10:22am

    Derek Jones's avatar

    Derek Jones

    7176 posts

    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.

  • #3 / Feb 20, 2017 10:51am

    Mandarax

    18 posts

    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.

  • #4 / Feb 20, 2017 10:57am

    Derek Jones's avatar

    Derek Jones

    7176 posts

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

  • #5 / Feb 20, 2017 11:00am

    Mandarax

    18 posts

    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.

  • #6 / Feb 20, 2017 11:07am

    Derek Jones's avatar

    Derek Jones

    7176 posts

    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?

  • #7 / Feb 20, 2017 11:21am

    Mandarax

    18 posts

    The screenshot is here:

    http://imgur.com/a/L7dmE

    Just had to remove all of the identifying information.

  • #8 / Feb 20, 2017 11:26am

    Derek Jones's avatar

    Derek Jones

    7176 posts

    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.

  • #9 / Feb 20, 2017 11:42am

    Mandarax

    18 posts

    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.

  • #10 / Feb 22, 2017 5:11am

    Mandarax

    18 posts

    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?

  • #11 / Feb 22, 2017 10:19am

    Derek Jones's avatar

    Derek Jones

    7176 posts

    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. smile

    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.

  • #12 / Feb 22, 2017 12:06pm

    Mandarax

    18 posts

    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.

  • #13 / Feb 22, 2017 1:04pm

    Derek Jones's avatar

    Derek Jones

    7176 posts

    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.

  • #14 / Feb 23, 2017 2:33am

    Mandarax

    18 posts

    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.

  • #15 / Feb 23, 2017 10:22am

    Derek Jones's avatar

    Derek Jones

    7176 posts

    Great, thanks for closing the circle on that one!

ExpressionEngine News

#eecms, #events, #releases