Open juergmessmer opened 6 years ago
Don't know what do do with this: except: when I move create element 'tree' to the first position in pages.admin.js.tmpl, the tree always seem to load (history back, first load, etc). Shall I commit this change?
Looks like I found a solution f527ea8450b3976d46bea0b0c31a33eccb67d909
After further tests I realized that the proposed solution doesn't work. Click on page tree item doesn't load a different page if loaded first/or something. So my solution just replaced one problem by another.
Which solution is less bad? We start with that and then fix the other problem.
It's difficult to decide. Loading the page tree at the end is more user friendly. If the tree is not loaded you see that immediately, loading in the beginning you only find out when you want to change the page and see that nothing happens. From a user point of view the first option is less bad. Now the question is which state is easier to debug? Back to previous state?
With commit a792b24afd3ed0ee9161c10095977e8f61c5c536 I tried out a new position for creating the page tree, back to the bottom of the file, but before the click handler. So far it looks like the page loading is successful now, even when loading the first time or after a history back click.
A problem remains: deleting a node throws an exception: TypeError: this._tree.remove is not a function
Somehow the page_tree is not known or fully loaded when the delete callback is set in create page_detail.
Note: The page is deleted from the server, but the page_tree not reloaded
Summary: (All tested Browsers)
(Firefox, NOT Safari)
I moved the "independent" delete error to it's own issue #243. It might still be related.
Another observation on this issue: when a admin file is changed and the cache needs to be newly written, then the page tree is not rendered, only "loading" displayed.
admin/pages/page_detail: quite frequently the page tree doesn't load, only "loading" is shown. this could relate to clear caches, to initial loading, it's also occurring after returning to pages with history back.
Note: after short testing with Safari it looks like this is a problem using Firefox. Chrome seems ok too in this respect (but page tree styles don't work properly)
relates to :jQuery 3 and jstree update