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

Error when creating first entry in a collection ordered by number #2019

Closed
nathobson opened this Issue Jun 14, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@nathobson

nathobson commented Jun 14, 2018

Describe the bug
When creating a new collection, ordered by number, creating the first entry through the control panel throws an error Call to a member function order() on null /home/vagrant/statamic/base/statamic/core/CP/Publish/EntryPublisher.php#166z

To Reproduce
Steps to reproduce the behavior:

  1. Go to Content -> Collections -> Create Collection within the CP
  2. Fill out collection details but ensure Select Order is set to Number
  3. Go to Collections -> New Collection Name -> Create Entry
  4. Add a title and publish
  5. See error

Expected behavior
The first entry is created successfully

Screenshot
screen shot 2018-06-14 at 10 49 47

Environment details (please complete the following information):

  • Statamic Version 2.9.8
  • Recently upgraded
  • OS: macOS 10.13.4
  • Browser: Chrome
  • Web Server: Nginx
  • PHP Version: 7.2
  • Addons installed: None

Additional context
If the first entry is created by manually saving a .md file with a filename such as 1.test.md, subsequent entries save as expected through the CP.

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Jun 14, 2018

Nice catch. Fixed for next release.

@wotta

This comment has been minimized.

wotta commented Jun 16, 2018

Nice catch I also encountered this ( thought it was an error in a package ).
So decided to fix it in the code, only to see that is was core code.

Glad you guys caught it real quick 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment