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

Error When Clicking URL and 'Change URL' Is Forbidden #42

Open
luxlogica opened this issue Aug 5, 2017 · 1 comment
Open

Error When Clicking URL and 'Change URL' Is Forbidden #42

luxlogica opened this issue Aug 5, 2017 · 1 comment

Comments

@luxlogica
Copy link

luxlogica commented Aug 5, 2017

For most top-level pages ('home', 'blog', 'shop', etc.), I disallow the option to 'Change URL'. In a page that doesn't allow the user to change the URL, clicking on the URL link inside the SEO field will cause an error. If the site's 'debug' option is true, it will trigger the Kirby debugger. If 'debug' is false, it will go to a Panel Error page that states that 'you are now allowed to do this'.

Steps to reproduce:

  1. edit the blueprint of one of your site's pages, to disallow changing of the page's URL:
title: Home
icon: home
options: 
  url: false
  [...]
  1. add the SEO field to the page:
fields:
  seo:
    type: seo
  1. Go to the Panel, and in the SEO field that is now displaying, click the page's URL - which appears in green underneath the Page Title.

This will cause an error on the site - Kirby 2.5.4.

Ideal Solution:
The plugin should check whether 'change url' is permitted for the current page/user, and if not, the URL in the field should not be a clickable link.

@luxlogica luxlogica changed the title Crash When Clicking URL and 'Change URL' Is Forbidden Error When Clicking URL and 'Change URL' Is Forbidden Aug 5, 2017
@luxlogica
Copy link
Author

The fix for this has now been submitted as pull request #44. 👍

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

1 participant