Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to update entry type handle of Single #2824

Closed
Wiejeben opened this issue Apr 29, 2018 · 5 comments
Closed

Unable to update entry type handle of Single #2824

Wiejeben opened this issue Apr 29, 2018 · 5 comments

Comments

@Wiejeben
Copy link
Contributor

Description

After creating a new entry with type Single, I am unable to change the entry type handle. I am however able to change the section type handle.

For now I had to manually change the entry type handle in the database myself.

Steps to reproduce

  1. Create a entry of type 'Single'
  2. Go to 'Edit entry type' and you will see there is no entry type handle field.
  3. So lets go change the section type handle... However when using {{ entry.type }} you will get back the initial handle of when we created the single.

Additional info

  • Craft version: 3.0.4
  • PHP version: 7.0.30
  • Database driver & version: MySQL 5.7.21
  • Plugins & versions: -
@brandonkelly
Copy link
Member

There’s no Name field either – because Single sections only have one entry type, so it didn’t seem to make sense to show those settings.

Is there a reason you want to edit the handle?

@Wiejeben
Copy link
Contributor Author

I made a typo the first time and in my templates I was using {{ entry.type }}, had to use {{ entry.section.handle }} to get the desired result.

@brandonkelly
Copy link
Member

Gotcha. We were already keeping single sections’ entry types’ names in sync with the section name, so I just updated that to also include their handles.

@herrajon
Copy link

herrajon commented Oct 20, 2018

I have the same problem. Perhaps not very important but the system does not update the entry.type.handle for use in the templates.

Made the cardinal sin of not choosing the right handle the first time so I seem to be stuck with frontPageI instead of the swag name I chose which is frontpage.

Craft 2.7.2

Update:
Pöteito .. Potato. I should really stop now. Confusing entry types and sections, sorry.

All good.

Have a nice weekend y'all.

brandonkelly added a commit that referenced this issue Oct 20, 2018
@brandonkelly
Copy link
Member

@herrajon The change was only made for Craft 3. I just backported it to Craft 2 for the next release, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants