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

Can't edit files in File Manager #731

Closed
MorningSleeper opened this issue Apr 25, 2017 · 65 comments
Closed

Can't edit files in File Manager #731

MorningSleeper opened this issue Apr 25, 2017 · 65 comments

Comments

@MorningSleeper
Copy link

MorningSleeper commented Apr 25, 2017

Theme 18.45
Webmin 1.831
Server OS: Ubuntu 14.04.5 LTS
Client OS: Win 10, Chrome and Firefox latest.
Right click file and select edit nothing happens. Chrome console log below.

image

@iliajie
Copy link
Collaborator

iliajie commented Apr 25, 2017

What exactly the file name that you're trying to edit?

@iliajie
Copy link
Collaborator

iliajie commented Apr 25, 2017

..and its path?

@MorningSleeper
Copy link
Author

MorningSleeper commented Apr 25, 2017

Same error occurs with any file name, extension and location, like robots.txt at /webserver/sites/mysite/robots.txt Used to be able to edit all fine. Only thing I can think of that has changed was I upgraded to latest version of theme.

@iliajie
Copy link
Collaborator

iliajie commented Apr 25, 2017

What if you go to Chrome, open console (F12) and then hold reload button (default one, usually top-left) and from drop down select 3 option?

If doesn't work, can you run in console localStorage.clear(), does it help?

What is the exact Chrome version?

@MorningSleeper
Copy link
Author

MorningSleeper commented Apr 25, 2017

Rebooted server and tried both suggestions, still getting error.

Chrome: Version 58.0.3029.81 (64-bit)
Firefox: 53.0 (32 & 64 bit)

Attaching Firefox console. Is the d referenced in error the parameter passed to decode_html function?

capture

@iliajie
Copy link
Collaborator

iliajie commented Apr 26, 2017

Now I'm confused..

@iliajie
Copy link
Collaborator

iliajie commented Apr 26, 2017

I'm gonna solve the issue hypothetically. Check the upcoming commit please ..

@MorningSleeper
Copy link
Author

MorningSleeper commented Apr 26, 2017

I tried the latest version, a file editor window now opens but it does not contain the file contents, just blank. No error in console.

@iliajie
Copy link
Collaborator

iliajie commented Apr 26, 2017

Please go to console, to the theme folder and run theme-updare.sh to do it manually.

@MorningSleeper
Copy link
Author

done, same issue, both browsers.

@iliajie
Copy link
Collaborator

iliajie commented Apr 26, 2017

Try other machine with browser having no extensions!

@MorningSleeper
Copy link
Author

Tried another computer, chrome and firefox, no extensions, same result. Disabled all extensions on first computer in both browsers also without change.

@iliajie
Copy link
Collaborator

iliajie commented Apr 26, 2017

Then the only last thing I can recommend. Please reboot the server.

@MorningSleeper
Copy link
Author

MorningSleeper commented Apr 26, 2017

Already tried that without change. Is there a way I can downgrade to a previous authentic theme version that I know it worked with to see if it was a change in the theme or something else that caused the change?

@iliajie
Copy link
Collaborator

iliajie commented Apr 26, 2017

Yes, download it from releases.

@MorningSleeper
Copy link
Author

MorningSleeper commented Apr 26, 2017

So 18.46 editor window opens but no file contents, 18.45 editor window does not open, 18.40 editor window opens and contains file contents.

@iliajie
Copy link
Collaborator

iliajie commented Apr 26, 2017

Can you download Webmin from GutHub, exctarct it and try with filemin from downloaded package?

You would need to replace in filemin folder /usr/bin/local/perl to /usr/bin/perl

@MorningSleeper
Copy link
Author

MorningSleeper commented Apr 26, 2017

Reinstalled webmin and filemin from download, filemin works fine using the latest authentic theme. I prefer to edit in the same tab so was using the built in version. I noticed from the filemin page it states the built-in version does not work with the authentic theme but it has worked just fine up until version 18.45 of the authentic theme.

@Bulmer
Copy link

Bulmer commented Apr 27, 2017

+1 same here. I upgraded to Authentic 18.46 last night in Webmin and now i can't edit within File Manager. I have 18.10 on another server and it works fine..
Just changed Theme to Original Theme(ugghh) and it edits fine.

@iliajie
Copy link
Collaborator

iliajie commented Apr 27, 2017

What do you mean built-in version from Webmin? Which one you were using before??

@iliajie
Copy link
Collaborator

iliajie commented Apr 27, 2017

@Bulmer Which server OS you have that it doesn't work on? Could you try to update filemin from Webmin repo to see if it works with the latest 18.46 release?

Please provide the screenshot of the whole page, I wanna take a look.

@divyeshsachan
Copy link

divyeshsachan commented Apr 27, 2017

I just checked on all of my 8 servers. File editor is working normally on Theme 18.45 and 18.46 on all of my servers. Checked on all combination of Ubuntu 16.04 & 14.04, Firefox 50 & Chrome 57. No issues at my end.

@iliajie
Copy link
Collaborator

iliajie commented Apr 27, 2017

@divyeshsachan Thanks for checking. None of us could reproduce it as well.

@Bulmer
Copy link

Bulmer commented Apr 27, 2017

@qooob . I was already using the Authentic theme and upgraded it. Im using the theme with Webmin 1.831 on my Debian 8 (jessie) vps.

@iliajie
Copy link
Collaborator

iliajie commented Apr 27, 2017

I finally COULD reproduce this issue by running localStorage.clear(), reloading page and going straight to File Manager.

Things seem broken.

I suppose you don't have localStorage or what else?

@iliajie
Copy link
Collaborator

iliajie commented Apr 27, 2017

Does it happen for you to edit the file on the / location?

@iliajie
Copy link
Collaborator

iliajie commented Apr 27, 2017

Whoever faced this issue could you please go to the directory, where you can't edit the file, click refresh button in the File Manager's button bar and try to hit edit again?

Does it work then?

@iliajie
Copy link
Collaborator

iliajie commented Apr 27, 2017

..do you also have by any chance tabs disabled in options?

EDIT: by tabs, I meant Restore previously used tabs on first load set to No

@iliajie
Copy link
Collaborator

iliajie commented Apr 27, 2017

That one is most likely dated (unless updated manually, which i doubt) and insecure, this is why it's not working.

The File Manager shipped with Webmin is the one that open in the same window and considered to be built-in. You can also open it in separate window if you need.

@MorningSleeper
Copy link
Author

Ok, thanks for clarifying further, I deleted the likely insecure version of filemin I installed through Webmin's install modules from www.webmin.com and installed the one that ships with Webmin from GitHub and can confirm I am able to edit files again with latest authentic theme.

@Bulmer
Copy link

Bulmer commented Apr 27, 2017

@qooob - I will try and get a video done later today, but just letting you know that edit_file.cgi query parameters for "file" and "path" are both empty (edit_file.cgi?file=&path=) when opening the empty file.

@iliajie
Copy link
Collaborator

iliajie commented Apr 27, 2017

@Bulmer Do you have latest filemin from Webmin repo installed and the latest Git version of the theme? Please make sure that you do, when you test it.

@sle44102
Copy link

I am also having the same issue (on CentOS 7.23)
I have latest beta Version 18.47beta7 and i BELIEVE latest filemin. I deleted filemin directory and reinstalled via webmin modules install page, previously i tried by copying github directory, but that was a total failure.

I get blank file when I open for edit.

@iliajie
Copy link
Collaborator

iliajie commented Apr 28, 2017

Use one from GitHub and replace Perl shebang. It's described in this post above.

@sle44102
Copy link

sle44102 commented Apr 28, 2017

OK, I will go through the thread again, it is not sinking in what is the clear directions to fix this. I did not see anything about shebang.

@iliajie
Copy link
Collaborator

iliajie commented Apr 28, 2017

Can you download Webmin from GutHub, exctarct it and try with filemin from downloaded package?

You would need to replace in filemin folder /usr/bin/local/perl to /usr/bin/perl

@sle44102
Copy link

This might be where some pain is, maybe language barrier.

I do not have a /usr/bin/local/perl directory (is that distro specific?)
[root@host bin]# cd /usr/bin/local/perl
/usr/bin/local/perl: No such file or directory

I do have a /usr/local/bin/perl but dont think that is it.
[root@host bin]# cd /usr/local/bin/perl
[root@host perl]# ls
hello_world.pl

I do have /usr/libexec/webmin/filemin, but if i replace that dir with the one from git download, I get a type error.

@iliajie
Copy link
Collaborator

iliajie commented Apr 28, 2017

It's something that has to be replaced in files.

@MorningSleeper
Copy link
Author

I updated to authentic theme 18.47 today and the files are back to being blank again. Looks like the value of the file query string is blank in edit_file.cgi ...

18-47

Downgraded to 18.46 and it works again and the value of the file query string is correct in edit_file.cgi

18-46

@iliajie
Copy link
Collaborator

iliajie commented Apr 28, 2017

18.47 has never been released.

@MorningSleeper
Copy link
Author

MorningSleeper commented Apr 28, 2017

My bad about the version number, It was working fine then I got the update button like so ...

image

When I clicked the change log it showed 18.47 so got confused about what version I was updating to.

image

In any case, what I ended up upgrading to was 18.46-git-201704281139 and then 18.46-git-201704282201 and the files went back to being blank in both. Any idea what might cause the file query string to be blank in those but ok in 18.46-git-201704271541?

@iliajie
Copy link
Collaborator

iliajie commented Apr 28, 2017

Try the latest commit. I don't think there could be anything that would make any change. It just should work.

You could always try the other OS, at least, for testing purposes, for instance Fedora Linux.

Remember: You need latest filemin from webmin/webmin repo

@MorningSleeper
Copy link
Author

MorningSleeper commented Apr 28, 2017

Definitively using latest filemin from webmin/webmin repo, reinstalled just now to make sure.

Tried the latest commit again and same result. It showed 18.46-git-201704282201 after installing. When I tried to edit a file, no file contents were displayed in file editor and file query string was blank. When I went back to 18.46-git-201704271541 editor shows file contents and file query string contains file name. Since then I have updated to 18.46-git-201704282348 but issue still occurs so went back to 18.46-git-201704271541 and all is working as expected.

Unfortunately I do not have another server to test a different OS.

@iliajie
Copy link
Collaborator

iliajie commented Apr 28, 2017

In Chrome Ctrl+Shift+R to hard reload cache?

@MorningSleeper
Copy link
Author

Tried hard reload of cache as suggested but issue still occurs with any version greater than 18.46-git-201704271541

@iliajie
Copy link
Collaborator

iliajie commented Apr 29, 2017

If you look at the changes made - there were no change to File Manager.

I don't see how it can be broken now. I tested it all possible ways on my systems and it works?

@MorningSleeper
Copy link
Author

MorningSleeper commented Apr 29, 2017

I did a bit more testing today and found that when I click the gear icon in upper right of File Manager for the module configuration page and uncheck the checkbox to the left of "Type" the file contents are displayed in file editor with any of the versions greater than 18.46-git-201704271541 including 18.47. If I check the box, issue returns. Also noticed the fourth checkbox has no description after it but that does not seem related as the results are the same with or without it checked. Hope that helps narrow down the cause.

image

@iliajie
Copy link
Collaborator

iliajie commented Apr 29, 2017

Damn, that's true! 😞

@iliajie
Copy link
Collaborator

iliajie commented Apr 29, 2017

I made a fix into 18.47, please upgrade and tell me how it is.

@iliajie
Copy link
Collaborator

iliajie commented Apr 29, 2017

..description for the checkboxes will be fixed in the next Webmin, it's not the theme issue.

@MorningSleeper
Copy link
Author

I reinstalled 18.47 from latest commit but issue still occurs when Type checkbox is checked.

@iliajie
Copy link
Collaborator

iliajie commented Apr 29, 2017

This time it will load the sane files unless you hard load cache.

It shouldn't be.

By the way, thank you very much!!

@MorningSleeper
Copy link
Author

Ok got it, after clearing cache it is working with latest theme in both Chrome and Firefox. Thanks for your help.

@iliajie
Copy link
Collaborator

iliajie commented Apr 29, 2017

Ok, good to know. And thank you!

@swelljoe
Copy link

Sounds like we need a more clear way to differentiate Filemin (as developed/maintained by Alexandr, aka Real Gecko) and the forked File Manager in Webmin. It's caused a lot of confusion in this thread.

I'll talk to Jamie about moving the Webmin file manager to another path and removing all mentions of Filemin; they've, unfortunately, diverged and it's confusing that there's two different things with the same name that install in the same path within Webmin.

Ilia, it's usually a bad idea to send folks out to git to grab pieces of Webmin, unless there's something that was hasn't made it into a release. Installing outside of the normal Webmin module install process is confusing for folks who don't know about the shebang. The version of a module from Webmin.com using the Webmin modules page should always be the latest released version of the module (sometimes newer than what's in the latest released Webmin, but never older). It is reasonable to tell people to install using that page.

But, if we get the Webmin file manager moved into its own directory, no one will need to think about it; Filemin and Webmin File Manager won't be able to conflict with each other.

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

7 participants