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

Localized sub pages can't be saved when the parent has a localized slug. #1595

Closed
codyspring opened this Issue Sep 14, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@codyspring

codyspring commented Sep 14, 2017

Actual behaviour

Localized sub pages can't be saved when the parent has a localized slug. In this case, I have pages for about-us (sobre-nosotros) and a child of testimonials (testimonios).

Steps to reproduce

  1. Create a page, localize it and change its localized slug.
  2. Try to create or save a localized child page.

Server Details

Operating System: Ubuntu 16.04 & MacOSX w Laravel Valet

Web Server: Apache and NGINX

PHP Version: 7.1

Statamic Version: 2.6.8

Updated from an older Statamic or fresh install: Updated

List of installed addons: None

Logs

[17:56:30] LOG.error: Exception: Parent page [/sobre-nosotros] doesn't exist. in /Users/codyspring/rp/ford/statamic/core/Data/Content/PathBuilder.php:208 Stack trace: #0 /Users/codyspring/rp/ford/statamic/core/Data/Content/PathBuilder.php(129): Statamic\Data\Content\PathBuilder->getParentPath() #1 /Users/codyspring/rp/ford/statamic/core/Data/Content/PathBuilder.php(120): Statamic\Data\Content\PathBuilder->getFilename() #2 /Users/codyspring/rp/ford/statamic/core/Data/Pages/Page.php(207): Statamic\Data\Content\PathBuilder->get() #3 /Users/codyspring/rp/ford/statamic/core/Data/Pages/Page.php(119): Statamic\Data\Pages\Page->buildPath() #4 /Users/codyspring/rp/ford/statamic/core/Data/Pages/Page.php(77): Statamic\Data\Pages\Page->setSlug('testimonios') #5 /Users/codyspring/rp/ford/statamic/core/CP/Publish/Publisher.php(274): Statamic\Data\Pages\Page->slug('testimonios') #6 /Users/codyspring/rp/ford/statamic/core/CP/Publish/Publisher.php(96): Statamic\CP\Publish\Publisher->updateContent() #7 /Users/codyspring/rp/ford/statamic/core/Http/Controllers/PublishController.php(101): Statamic\CP\Publish\Publisher->publish() #8 [internal function]: Statamic\Http\Controllers\PublishController->save(Object(Illuminate\Http\Request)) #9 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(256): call_user_func_array(Array, Array) #10 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(164): Illuminate\Routing\Controller->callAction('save', Array) #11 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(112): Illuminate\Routing\ControllerDispatcher->call(Object(Statamic\Http\Controllers\PublishPageController), Object(Illuminate\Routing\Route), 'save') #12 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #13 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #14 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #15 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #16 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #17 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(68): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(Statamic\Http\Controllers\PublishPageController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'save') #18 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Routing/Route.php(203): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Statamic\\Http\\C...', 'save') #19 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Routing/Route.php(134): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request)) #20 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(708): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request)) #21 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #22 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #23 /Users/codyspring/rp/ford/statamic/core/Http/Middleware/CP/Authenticate.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #24 [internal function]: Statamic\Http\Middleware\CP\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure)) #25 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #26 /Users/codyspring/rp/ford/statamic/core/Http/Middleware/Outpost.php(48): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #27 [internal function]: Statamic\Http\Middleware\Outpost->handle(Object(Illuminate\Http\Request), Object(Closure)) #28 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #29 /Users/codyspring/rp/ford/statamic/core/Http/Middleware/CP/Localize.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #30 [internal function]: Statamic\Http\Middleware\CP\Localize->handle(Object(Illuminate\Http\Request), Object(Closure)) #31 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #32 /Users/codyspring/rp/ford/statamic/core/Http/Middleware/CP/DefaultLocale.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #33 [internal function]: Statamic\Http\Middleware\CP\DefaultLocale->handle(Object(Illuminate\Http\Request), Object(Closure)) #34 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #35 /Users/codyspring/rp/ford/statamic/core/Http/Middleware/CpEnabled.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #36 [internal function]: Statamic\Http\Middleware\CpEnabled->handle(Object(Illuminate\Http\Request), Object(Closure)) #37 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #38 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #39 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #40 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(710): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #41 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(674): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request)) #42 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request)) #43 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request)) #44 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request)) #45 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #46 /Users/codyspring/rp/ford/statamic/vendor/barryvdh/laravel-debugbar/src/Middleware/Debugbar.php(51): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #47 [internal function]: Barryvdh\Debugbar\Middleware\Debugbar->handle(Object(Illuminate\Http\Request), Object(Closure)) #48 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #49 /Users/codyspring/rp/ford/statamic/core/Http/Middleware/PersistStache.php(22): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #50 [internal function]: Statamic\Http\Middleware\PersistStache->handle(Object(Illuminate\Http\Request), Object(Closure)) #51 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #52 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #53 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure)) #54 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #55 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #56 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #57 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #58 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #59 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #60 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #61 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #62 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure)) #63 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #64 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #65 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure)) #66 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #67 /Users/codyspring/rp/ford/statamic/core/Http/Middleware/Glide.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #68 [internal function]: Statamic\Http\Middleware\Glide->handle(Object(Illuminate\Http\Request), Object(Closure)) #69 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #70 /Users/codyspring/rp/ford/statamic/core/StaticCaching/Middleware/Retrieve.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #71 [internal function]: Statamic\StaticCaching\Middleware\Retrieve->handle(Object(Illuminate\Http\Request), Object(Closure)) #72 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #73 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #74 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure)) #75 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #76 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #77 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #78 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #79 /Users/codyspring/rp/ford/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request)) #80 /Users/codyspring/rp/ford/index.php(155): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request)) #81 /Users/codyspring/.composer/vendor/laravel/valet/server.php(133): require('/Users/codyspri...') #82 {main}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment