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

Page-Edit: Could not go back from 'Expert' to 'Normal' #48

Closed
K232 opened this issue Aug 11, 2015 · 12 comments
Closed

Page-Edit: Could not go back from 'Expert' to 'Normal' #48

K232 opened this issue Aug 11, 2015 · 12 comments
Labels

Comments

@K232
Copy link
Contributor

K232 commented Aug 11, 2015

Hi all,
first: Thanks a lot for this great plugin!!

On the pages-menu I click on an existing page. I could click on all the header tabs. I also clicked on 'Expert' at the right side. The tabs are replaced by 'Content' and 'Options'. But nothing happens when I click on 'Options'. Same when I click on 'Normal' so I could not go back to the Normal-View. I also left the page and went back to the menu, clicked on another page, but there is the same result: It shows 'Content', 'Options', 'Normal' and 'Expert' but nothing happens when I click on one of them. Additionally I've noticed that the mouse pointer does not change when I hover one of these buttons, but it changes when I just move the mouse from 'Options' to 'Normal' on the tab row. It's changing to a 'drag-and-drop' mouse pointer, and I could hold the left button and drag one of my other pages appearing somehow.... Confusing to explain. If it does not happen on your installation please send me short info so I try to create a video of it.

Another thing: It would also be nice if the 'Please report it on Github' would contain a hyperlink to the repository.

Many thanks!!
Kai

@flaviocopes
Copy link
Contributor

Hi Kai, first question which browser are you using?
Does the same happen with Chrome for example? If Yes, what's your setup? E.g. MAMP or anything else?

@K232
Copy link
Contributor Author

K232 commented Aug 11, 2015

Hi Flavio,
I'm using Firefox 34 (oh, need to update...). I've tried with IE 10, and there the problem does not appear .... Additionally I've seen that the problem only exists when I'm working on new / existing pages within a certain folder. It's my first folder (01) and it contains a german umlaut ä . It has around 300 pages already. I also have another folder with an umlaut, there the problem does not appear....?? I've created a screen video at http://ge.tt/5VdVq0M2/v/0?c

I've now upgraded to latest Firefox 39.0.3 on another machine. Same problem exists. But an easy workaround for me: Open an existing page which works fine and switch back to 'Normal' there. I think I don't need the expert mode.

@flaviocopes
Copy link
Contributor

Ok I tested the umlaut, I think we isolated the issue.

So Windows environment, Firefox fails, IE works fine.

I tested on Mac, works in both Chrome and Firefox. But, I cannot reach the page in the frontend if the folder/slug contains an umlaut.
Can you please check if you see the page in the frontend of the site? Or you get a 404 when trying to open it?

Another question: if you avoid putting the umlaut in the folder name, and instead change the page title / slug to contain it? e.g.

01.test/default.md

---
title: Testasäaa
slug: testasäaa
---

# XXX

Does it work the admin now? Or same problem as before?

@K232
Copy link
Contributor Author

K232 commented Aug 11, 2015

In my configuration only the title contains an umlaut. I don't have a slug defined, and the folder name is '01. blog'. Does this help?

@K232
Copy link
Contributor Author

K232 commented Aug 11, 2015

By the way, you could also ignore this one in my first post:
Another thing: It would also be nice if the 'Please report it on Github' would contain a hyperlink to the repository.
When I'm back to 'Normal' it's a link as expected.

@rhukster
Copy link
Member

Would be good to test this again after the next release. There were a few things that could impact this.

@K232
Copy link
Contributor Author

K232 commented Aug 12, 2015

I've just installed release 0.9.3.6 and updated all plugins, I think it was admin panel, login and email? Admin Panel is now release 0.3.0 and problem still exists, but I'm not sure whether that's the version which you meant with 'next release'.

@K232
Copy link
Contributor Author

K232 commented Aug 12, 2015

Hm, I've just installed Grav 0.9.37, and now I have the same problem also on Normal-Tab... So 'Normal' is selected but I could not 'Options' or 'Advanced' etc.... I have not noticed the problem with grav 0.9.36 so I reinstalled 0.9.36 but it's the same result, it's not working. But it's probably not related to the grav version but to the admin panel. Just wanted to let you know. Anyway it's not urgent for me to get this running. Just wanted to let you know.

@rhukster
Copy link
Member

@K232 are you running on windows? What version of PHP? Would it be possible to get a copy of your user/ folder (dropbox/onedrive/googledrive) etc? That way I can try to recreate your setup on my local.

@K232
Copy link
Contributor Author

K232 commented Aug 13, 2015

Sure. How could I reach you?

@K232
Copy link
Contributor Author

K232 commented Aug 14, 2015

I've found the reason and how to workaround :-)
I had a look at the source and saw that all my blog posts are listed there when I go to edit a single page. As said above, I have currently around 300 pages in this directory. So I just deleted all my posts from this folder and copied them in blocks back. Everything worked fine, even 200 posts was no problem. But when I uploaded post 208 I've noticed that the upper half of the tab bar buttons was not clickable anymore. Have a look here: http://de.tinypic.com/r/28rlb95/8
The reason was not the post itself, because I removed it and uploaded another one and had the same behavior. So I've checked how to remove the list from tab 3. I've found it in user/plugins/admin/themes/grav/templates/form/fields/oder/order.html.twig. First I just removed the for loop in lines 26-28, and that fixed the problem. Now I was able to edit, click on tabs, go to expert and back to normal mode. I uploaded all the other files and it's working fine also with 300 posts!

So here is my workaround for this problem. I've updated lines 26-28 in to the following:

{% if siblings|length < 200 %}
  <ul id="ordering" class="{{ field.classes }}">
    {% for page in siblings %}
      <li class="{% if page.order  == value %}drag-handle{% else %}ignore{% endif %}" data-id="{{ page.slug }}">{{ page.title() }}</li>
    {% endfor %}
  </ul>
{% else %}
  Your list contains more than 200 elements and is therefore not displayed to avoid technical problems.
{% endif %}

I will create a new pull request even though I'm not sure whether you want to take it this way or whether you want to investigate further whether 200 is a good limit or whether there are cases where 100 is a better limit or else. So feel free to use or update as you like.
Thanks a lot for this brillant Grav and excellent admin panel!!

@K232 K232 mentioned this issue Aug 14, 2015
@rhukster
Copy link
Member

Merged, so should be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants