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

Reordering pages and save error #2081

Closed
mirill1 opened this Issue Jul 26, 2018 · 7 comments

Comments

Projects
None yet
4 participants
@mirill1

mirill1 commented Jul 26, 2018

Description:
I reorder the pages in the cp. After I clicked the save button there comes a exception.

Steps to reproduce the behavior:

  1. Reorder pages via drag and drop
  2. Click on save
  3. Look in the console for the error

Error message:
Argument 2 passed to Statamic\Events\Data\PageMoved::__construct() must be an instance of Statamic\Events\Data\string, string given, called in /var/www/html/statamic/core/Data/Pages/PageTreeReorderer.php on line 42 and defined' in /var/www/html/statamic/core/Events/Data/PageMoved.php:31

Details:

  • Statamic Version 2.10.2
  • Fresh Install or Upgrade:
  • OS: macOS 10.12.6
  • Browser: chrome, safari
  • Web Server: Apache
  • PHP Version: 5.6.27
@jesseleite

This comment has been minimized.

Member

jesseleite commented Jul 31, 2018

Can't reproduce. It happens on every save?

@mirill1

This comment has been minimized.

mirill1 commented Aug 1, 2018

Yes, it happens on every save.
I deleted all pages and created new pages, same problem.

@nevoxx

This comment has been minimized.

nevoxx commented Aug 1, 2018

Statamic\Events\Data\PageMoved::__construct() seems to use php 7 type hints, which cause an error when using php 5. Did the requirements for the php version change? the documentation says php >= 5.5.9 at https://docs.statamic.com/installing

public function __construct(Page $page, string $oldPath, string $newPath)

@jasonvarga

This comment has been minimized.

Member

jasonvarga commented Aug 1, 2018

That's a mistake, we'll sort that out. Thanks!

@nevoxx

This comment has been minimized.

nevoxx commented Aug 1, 2018

Same thing in Statamic\Events\Data\SettingsSaved:

public function __construct(string $path, array $data)

@jasonvarga

This comment has been minimized.

Member

jasonvarga commented Aug 1, 2018

Yep, we'll adjust all those new events we added in 2.10, thanks for pointing that out.

@nevoxx

This comment has been minimized.

nevoxx commented Aug 1, 2018

thanks. much appreciated

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