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

Can't copy template code for custom fields

Development and Programming

Paul Vance's avatar
Paul Vance
123 posts
one year ago
Paul Vance's avatar Paul Vance

When I click on the field name in the field manager, only the template code for native fields like title and URL_title is copied. It’s not working for custom fields of any type.

Console is showing a 404 error when trying to access /cp/design/copy/fields

Running version 7.5.3 (updated via one-click update)

       
Tom Jaeger's avatar
Tom Jaeger
449 posts
one year ago
Tom Jaeger's avatar Tom Jaeger

Hi Paul,

Thanks for posting this. We’ll take a peek at it!

FWIW, it’s suppose to copy the field short name if the add-on doesn’t specifically support the template code copying.

Thanks,

-Tom Jaeger

       
Paul Vance's avatar
Paul Vance
123 posts
one year ago
Paul Vance's avatar Paul Vance

Thanks Tom! To clarify, there is no add-on being used here - by native fields I meant standard ones.

       
Tom Jaeger's avatar
Tom Jaeger
449 posts
one year ago
Tom Jaeger's avatar Tom Jaeger

Oh.. so this is native fields / no third party fields?

We’ll run some tests (I believe we have automated tests around this as well)… digging.

-Tom Jaeger

       
Robin Sowell's avatar
Robin Sowell
13,255 posts
one year ago
Robin Sowell's avatar Robin Sowell

Hrm- worked for me in a quick test. Are you on https? I believe that’s required- though I’d need to double check.

       
Paul Vance's avatar
Paul Vance
123 posts
one year ago
Paul Vance's avatar Paul Vance

Yes, there are no third-party fields and yeah it is https. It definitely works elsewhere for me too, just not on this particular site. I’ve compared everything side by side, cleared browser cache etc. but no luck.

       
Robin Sowell's avatar
Robin Sowell
13,255 posts
one year ago
Robin Sowell's avatar Robin Sowell

So- very, very weird.

Here’s what I’d do. Open your browser debug, network tab, get the url it’s using. So one of mine is like

https://75gen:8890/admin.php?/cp/design/copy/fields/27=

And just go directly there. First thing we want to know is whether the url itself looks correct and it’s not dropping off an id or something. If it’s working in some other places on the same install, see if you can see how they differ. If nothing looks funky there, we’re down to debugging the slightly less weird issue of- why the heck does this url that should work, not work. Funky server security filter? htaccess run amok? Some weird thing where you have a name conflict?

It’s very odd- heck, maybe something just failed to upload/overwrite in the 1-click or initial install or something.

But at least it’s a slightly easier problem.

       
Paul Vance's avatar
Paul Vance
123 posts
one year ago
Paul Vance's avatar Paul Vance

Thanks Robin!

In the install that works, the URL in the network tab looks like:

admin.php?/cp/design/copy/fields/94

In the install that doesn’t work, it looks like:

admin.php?/cp/design/copy/fields&S=335b7d62bf89d93acd8018fd78b08fe7/126

       
Robin Sowell's avatar
Robin Sowell
13,255 posts
one year ago
Robin Sowell's avatar Robin Sowell

ARGH- thanks! It’s a bug. There’s a problem when sessions are required in the cp. Reported it https://github.com/ExpressionEngine/ExpressionEngine/issues/4588 and should be a quick fix, out in next release. That last segment should be before the session id!

       
Paul Vance's avatar
Paul Vance
123 posts
one year ago
Paul Vance's avatar Paul Vance

Sounds good Robin - thanks for the quick replies!

       
Sarah93's avatar
Sarah93
12 posts
one year ago
Sarah93's avatar Sarah93

Looks like there’s a small routing issue with copying custom field templates when CP sessions are enabled. The dev team is aware and working on a fix. Shouldn’t be a long-term problem.

       
Paptur1's avatar
Paptur1
2 posts
6 months ago
Paptur1's avatar Paptur1

It sounds like the issue is related to the control panel’s copy fields functionality not supporting custom fields in version 7.5.3. The 404 error when accessing /cp/design/copy/fields suggests that the route or controller handling this action might be missing or misconfigured.

A few things to try:

Double-check if any add-ons or custom extensions might be interfering with the field manager.

Verify that your update to 7.5.3 completed successfully and no files were missed.

Consider clearing the site cache and browser cache.

If possible, test on a fresh install or earlier version to see if the issue persists.

If the problem continues, it might be worth reporting it on the official support forum or checking if there’s a patch available for custom fields copying.

Hope this helps! Let me know if you need further assistance.

       

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.