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

[5.x]: Globals without field layout cannot be deleted. #15123

Closed
panlatent opened this issue Jun 3, 2024 · 2 comments
Closed

[5.x]: Globals without field layout cannot be deleted. #15123

panlatent opened this issue Jun 3, 2024 · 2 comments
Assignees
Labels

Comments

@panlatent
Copy link
Contributor

What happened?

Description

Globals without field layout cannot be deleted.

Steps to reproduce

  1. New a globals (Not add field layout)
  2. Save
  3. Delete it

Expected behavior

Deleted.

Actual behavior

Exception: craft\services\Fields::getLayoutById(): Argument #1 ($layoutId) must be of type int, null given, called in /var/www/html/vendor/craftcms/cms/src/services/Globals.php on line 509

Craft CMS version

5.1.7

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@i-just
Copy link
Contributor

i-just commented Jun 3, 2024

Hi, thanks for reporting! I raised a PR for this.

@brandonkelly
Copy link
Member

Craft 5.1.8 is out with that fix. Thanks again!

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

No branches or pull requests

3 participants