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

Green status button doesn't change when changing the status of a page via button in panel #1613

Closed
kgevaert opened this issue Mar 25, 2019 · 3 comments

Comments

@kgevaert
Copy link

kgevaert commented Mar 25, 2019

@distantnative

kirby 3.1

Page is on public status

page update after hook sets the status of the page to unlisted if a toggle field is enabled.

 'hooks' => [
   	'page.update:after' => function ($newpage,$oldpage) {
         $kirby = kirby();
         $kirby->impersonate('kirby');
         $template=$newpage->intendedTemplate() ;
         if($template == "invite"){ 
         	if($newpage->status() != "unlisted" && $newpage->denied() == "true"){         		 
         		$newpage->changeStatus("unlisted");
         	}
         }
      },

The page is in the content-folder displayed as unlisted, but on the current page in the panel, the green public dot hasn't changed to a blue unlisted button.

Schermafbeelding 2019-03-25 om 13 20 53

https://forum.getkirby.com/t/green-status-button-doesnt-change-when-changing-the-status-of-a-page-via-button-in-panel/13471/2

@distantnative
Copy link
Member

Could you try if it might be working with page.update:before?

@distantnative distantnative added the needs: information ❓ Requires more information to proceed label Apr 1, 2019
@kgevaert
Copy link
Author

kgevaert commented Apr 3, 2019

No, the same problem with page.update:before...

@distantnative distantnative added status: difficult 🤯 and removed needs: information ❓ Requires more information to proceed labels Apr 16, 2019
@distantnative distantnative added this to the 3.2.0 milestone Apr 16, 2019
@distantnative distantnative modified the milestones: 3.2.0, 3.2.3 May 10, 2019
@bastianallgeier bastianallgeier modified the milestones: 3.2.3, 3.2.4 Jul 10, 2019
@bastianallgeier bastianallgeier removed this from the 3.2.4 milestone Aug 22, 2019
@distantnative
Copy link
Member

Solution covered by idea getkirby/ideas#480

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