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

Admin preview of root page does not always work in Firefox #59

Closed
briancappello opened this issue Dec 29, 2015 · 5 comments
Closed

Admin preview of root page does not always work in Firefox #59

briancappello opened this issue Dec 29, 2015 · 5 comments
Labels

Comments

@briancappello
Copy link
Contributor

This was tested on the lektor/lektor-website repository.

Ways I've discovered to reproduce this:

  1. Navigate directly to localhost/admin/root/preview, or
  2. Edit the root page, and then press save changes

How to get the root preview to work:
While previewing a subpage, click the index link in the top-left of the admin. The root preview now works. However, performing either action above breaks it again.

Related question: How do you set up development for working on the react admin interface? I tried LEKTOR_DEV=1 lektor server -f webpack but I seem to need to re-run that command every time I change a file :/

@mitsuhiko
Copy link
Member

Can you clarify what you mean by "does not always work"? How does the not working part look like?

Related question: How do you set up development for working on the react admin interface? I tried LEKTOR_DEV=1 lektor server -f webpack but I seem to need to re-run that command every time I change a file :/

-f webpack is not necessary. LEKTOR_DEV=1 is all you need. Not sure what you mean by needing to re-run this every time.

The fact that reloads do not work for you make me wonder if file system notifications do not work on your setup. What operating system and file system are you using?

@mitsuhiko mitsuhiko added the nmi label Dec 29, 2015
@briancappello
Copy link
Contributor Author

As best I can tell the embedded iframe isn't getting updated. Eg render() gets called but the component doesn't update the proper URL for it to display.

As for my dev environment: Ubuntu 14.04 / ext4.
Created a virtualenv, and installed lektor master using python setup.py install
I then navigate to the lektor project I'm working on, and run the LEKTOR_DEV=1 lektor server command. It starts, and seems to watch python files correctly (eg it notices when i re-install lektor) but webpack doesn't pick up the fact that some of the jsx files have changed.

@rubenbe
Copy link
Contributor

rubenbe commented Dec 29, 2015

I can reproduce using this sequence on Firefox:

  1. admin/root:/preview : OK
  2. admin/root/preview: OK
  3. admin/root/edit
  4. admin/root/preview: preview doesn't render

The first two steps aren't strictly necessary, but show that the problem doesn't occur on all previews. I would say the issue only occurs after every root edit.

Chromium seems to work fine.

@briancappello
Copy link
Contributor Author

Yep good call, this does seem to be isolated to Firefox. Tested with versions 42 and 43 (latest stable).

Don't know if this helps, but I get even stranger behavior in Rekonq (Qt WebKit) - the src attribute of the iframe gets set correctly to '/', and the height of the iframe renders correctly, but the content of the iframe never renders (not even after previously previewing a subpage, as works in Firefox). All subpage previews render correctly however, same as in Firefox.

@mitsuhiko
Copy link
Member

@rubenbe seems to be a problem with Firefox only. Cannot reproduce this on Chrome.

@briancappello the lack of webpack rebuilding is probably an issue with webpack. It definitely works correctly on OS X.

@mitsuhiko mitsuhiko changed the title Admin preview of root page does not always work Admin preview of root page does not always work in Firefox Dec 29, 2015
@mitsuhiko mitsuhiko added bug and removed nmi labels Dec 29, 2015
xlotlu pushed a commit that referenced this issue Jun 13, 2020
xlotlu pushed a commit that referenced this issue Jun 14, 2020
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