WordPress.org

Ready to get started?Download WordPress

Forums

WPide
[resolved] DId not work for me.. (32 posts)

  1. jessehalldesign
    Member
    Posted 2 years ago #

    I really wanted to use this, but unfortunately it didn't work on chrome Mac..Tired in on several wordpress sites.

    http://wordpress.org/extend/plugins/wpide/

  2. WPsites
    Member
    Plugin Author

    Posted 2 years ago #

    When you say it didn't work do you mean it didn't do anything whatsoever?

    Did it show you line numbers when editing a theme or plugin file?

    Did you notice any browser errors?

  3. Dinesh Kesarwani
    Member
    Posted 2 years ago #

    It's didn't work for me also. It is not displaying the file list. And, casing error while click "save file". See the below screenshot.

    http://awesomescreenshot.com/0034slre5

  4. WPsites
    Member
    Plugin Author

    Posted 2 years ago #

    It's probably something to do with your file permissions, 90% sure of that. The only other thing is the "wp-content" folder, WPide uses that as it's root so if you have a setup where you have renamed the wp-content folder it won't work.

    Your files need to be writable to your web server user and the files probably need to be owned by that same user otherwise WPide will not be able to open or save files.

    My very next job is to add some pre startup checks in WPide so that if there is an issue with permissions then it will let you know.

  5. WPsites
    Member
    Plugin Author

    Posted 2 years ago #

    2.0.3 of WPide is being uploaded as I type this so that now if there is a permission issue the plugin will give an alert to let you know of the situation.

    Thanks for your feedback.

  6. Abel Braaksma
    Member
    Posted 2 years ago #

    I just installed the newest version today, but unfortunately, I happen to see the same issue Cyberwani shows in his screenshot. No files in the file list and only the text

    Use the file manager to find a file you with edit, click the file name to edit.

    I'm pretty sure it isn't a rights-issue. If I go to any plugin and to the Editor screen, I can edit any file I want, and these reside in the wp-content folder also.

    In Opera I see the word "Files" and the number "0". In Firefox, the right-hand side of the screen is empty. If there's anything I can check to help you solve this issue, let me know.

  7. WPsites
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for your feedback metacarpus.

    I'm going to try and make a few further changes to the plugin so that the initial editor screen shows some further text upon startup. Maybe more of a break down of folder permissions so that if people have similar issues we can rule out permissions for sure.

    The right hand side of the screen should show the file tree. It gets this information with an ajax call back to the server. So maybe there is a problem with that ajax call.

    It's working for me. I'm still sure your problems are something to do with permissions. Just hold fire until I release another version later today.

  8. mikegoodstadt
    Member
    Posted 2 years ago #

    I get the same issue - but I installed while using no-ip.com - would that affect it?

  9. Abel Braaksma
    Member
    Posted 2 years ago #

    The right hand side of the screen should show the file tree. It gets this information with an ajax call back to the server. So maybe there is a problem with that ajax call.

    The path never gave problems with other plugins that also try to write, including WP itself and WP's plugin manager. The only oddity I have is that it's a compressed D-drive, but I can hardly think that's an issue here...

    If I'd know where to look I might help finding the culprit.

  10. WPsites
    Member
    Plugin Author

    Posted 2 years ago #

    I've finally managed to upload version 2.0.4 which will throw a javascript alert if it has trouble reading the files and in the editor window where it says "use the file manager..." it will also show some startup/debug info that will help us to see if permissions are the issue.

    Paste that startup info in here.

    If you can use the inbuilt theme/plugin code editor then you should be able to use WPide.

    Once again, thanks for everyones feedback.

  11. WPsites
    Member
    Plugin Author

    Posted 2 years ago #

    I don't see why a compressed D-drive would cause any problems when using this plugin.

    Likewise I don't think no-ip.com should cause any problems.

  12. Abel Braaksma
    Member
    Posted 2 years ago #

    Thanks for your efforts so far, it's much appreciated and I sure hope we get this working :)

    I've just downloaded and upgraded the plugin. It indeed shows a message now:

    WPide is having trouble accessing your files

    Where can I find the startup/debug info?

  13. WPsites
    Member
    Plugin Author

    Posted 2 years ago #

    When your looking at the editor for the first time (after clicking the WPide link in your WP admin) it should say some stuff:

    Use the file manager to find a file you wish edit, click the file name to edit.

    WPIDE STARUP CHECKS
    ___________________

    WordPress version = 3.3.2

    Web server user/group = www:www
    wp-content owner/group = www:www

    wp-content folder exists and contains 11 files

    Using the direct method of the WP filesystem API
    The wp-content folder IS readable and IS writable by this method
    The wp-content/plugins folder IS readable and IS writable by this method
    The wp-content/themes folder IS readable and IS writable by this method
    ___________________

  14. Abel Braaksma
    Member
    Posted 2 years ago #

    Since you mention "the first time", I figured it might have to do with me updating it instead of installing it for the first time.

    Unfortunately, even when I uninstall (and I checked the folder on the server to see whether it was really removed) and then reinstall it, I still don't get a screen with the "WPIDE STARUP CHECKS" like you describe.

    Only the first line "Use the file manager to find a file you wish edit, click the file name to edit." and on top a popup with the text "WPide is having trouble accessing your files". That's all.

    Anything else I can check or try?

  15. WPsites
    Member
    Plugin Author

    Posted 2 years ago #

    Hi metacarpus,

    I've just uploaded another version 2.0.5 which has some extra debugging information for the filesystem API. I think for some reason the filesystem API is not initialising correctly for you. If on startup WPide has a problem setting up the filesystem API then it will output a dump of the filesystem api before WPide ran and a dump of the filesystem API after WPide tried to run the API with the "direct" method (working directly with the local filesystem).

    Reinstall/upgrade the plugin and let me know what debug info you get.

  16. Abel Braaksma
    Member
    Posted 2 years ago #

    I just tested it again in IE, Opera, Firefox and this time it shows three lines:

    Use the file manager to find a file you wish edit, click the file name to edit.

    0

    I.e.: the one line I always see, plus a "0". Oh, and the popup is still saying the same: "WPide is having trouble accessing your files".

    Btw, you asked in an earlier post about whether I could change files using the default editor of WordPress. The answer is yes, without trouble.

  17. Abel Braaksma
    Member
    Posted 2 years ago #

    Just thinking out loud: maybe the JavaScript code you use requires extra privileges from the browser? I noticed that you load quite a lot JS scripts. However, I do not get any JS error in the JS console.

    The "0", btw, didn't appear in Firefox. Only in IE / Opera.

  18. WPsites
    Member
    Plugin Author

    Posted 2 years ago #

    This plugin is 99.7% JavaScript and only 0.3% PHP so yes there are LOTS of JavaScript files!

    It's looking more like this problem is to do with any ajax calls that the WPide page is trying to do. When you first load up the editor it will try get a list of files in the filetree on the right (alerting you if it has trouble getting a file list) and then some startup info in the editor code panel. So 2 ajax calls neither of which seem to come back with any content in your case.

    If an ajax request returns 0 it generally means the ajax ran OK. I think the problem may be that the function in WPide that is ment to run during the ajax request is not getting called for some reason. So I have made some changes to the plugin so that it's coded in a different way that hopefully will make it work!

    Version 2.0.6 is available for download now

    Run the new version and if it still doesn't work then try turning on debugging in WordPress (temporarily) to make sure there are no errors or conflicts. You need to add the below into your wp-config.php file. On most systems the WP_DEBUG setting is defined already in the config file but set to false. http://codex.wordpress.org/Editing_wp-config.php#Debug

    define('WP_DEBUG', true);
    define('SCRIPT_DEBUG', true);

    Good look and thanks for your help.

  19. Abel Braaksma
    Member
    Posted 2 years ago #

    Thanks for your continued patience in trying to solve this.

    Unfortunately, still the same screen for me, no extra info coming, nor a file / dir list.

    When I check the two AJAX calls being made with Firebug, I see that the first call, wpide_startup_check, returns "0". The second call jqueryFileTree, also returns "0". There's no HTML, just one digit.

    I saw that the second function has a parameter "\". If this means that he reads the root of the filetree (I mean, like "d:\" or something), it is likely that it will fail, as it can only have access to the wp-content dirs and below.

  20. WPsites
    Member
    Plugin Author

    Posted 2 years ago #

    As far as the front end of WPide is concerned / is the root. It's only when the files are requested through jQuery that the path to wp-content is prepended to the path specified in the jQuery. So "/" is always translated to "/your/web/path/to/wp-content/" on the back end.

    I've just had a thought - your on windows!? there must be a problem with the slashes. I will fire up a Windows server now and look into it.

  21. Abel Braaksma
    Member
    Posted 2 years ago #

    Yep, I'm very much on Windows. Though the paths do not have spaces (I tend to not install *nix-originated software in paths with spaces), I can understand that you have issues.

    However, in Windows, all paths can be accessed with forward slashes just like with *nix paths. But if you retrieve paths and append paths, you must use either forward, or backward slashes, not both. And I thought the path-manipulating functions of PHP were operating system agnostic.

  22. WPsites
    Member
    Plugin Author

    Posted 2 years ago #

    I've just commissioned a Windows server with a WordPress install and everything works as expected. Even on a multisite install.

    I just thought once I clicked you used Windows and we were talking about "/" that I've had problems before with plugins working on Linux and then not working on Windows due to complications with forward and backward slashes.

    Have you tried turning on debugging in WordPress? http://codex.wordpress.org/Editing_wp-config.php#Debug

    It's my only other option. If you enable debugging in WordPress then it might alert us to potential issues or plugin conflicts.

  23. Abel Braaksma
    Member
    Posted 2 years ago #

    There were no errors, only notices when showing debugging messages. However, after some trial and error, I found that the echo-statements don't work in the ajax-calls (hence the empty pages), so I figured the ajax-calls were not registered correctly.

    I noticed the following line:

    if ( $_SERVER['PHP_SELF'] === '/wp-admin/admin-ajax.php' ||
         $_GET['page'] === 'wpide' ){

    The index isn't always set, but changing it to this didn't help:

    if ( $_SERVER['PHP_SELF'] === '/wp-admin/admin-ajax.php' ||
        (isset($_GET['page']) && $_GET['page'] === 'wpide' )){

    Changing it to the following partially seemed to help (but many AJAX and JS errors):

    if ( $_SERVER['PHP_SELF'] === '/wp-admin/admin-ajax.php'){

    And finally changing it to this showed the file list and I could click the files:

    if (true){

    Obviously, it is not intended to always set the AJAX hooks. My wild guess is that PHP_SELF is not set the way you expect it to be set. However, once I had it set to if(true) I noticed that editing was next to impossible (after each key I hit, many more items were added to the file). I don't know how it is expected to work, but I think my "solution" may have made things worse.

    I revert it for now. Hopefully you can do something with this information.

  24. WPsites
    Member
    Plugin Author

    Posted 2 years ago #

    Any chance you could echo out the PHP_SELF predefined variable? Add something along the lines of:

    echo "[". $_SERVER['PHP_SELF'] . "]";

    Add it into the WPide.php file just before it does that check. It does indeed sound like this variable is the problem.

  25. Abel Braaksma
    Member
    Posted 2 years ago #

    Ah, I get it now. The check assumes that the WordPress site is in the root. Which is not the case in my scenario (and I assume that happens more often). The path in my case is:

    /blog/wp-admin/admin-ajax.php

    I changed the offending line as follows:

    $test = '/wp-admin/admin-ajax.php';
    if ( substr_compare($_SERVER['PHP_SELF'], $test, -strlen($test), strlen($test)) === 0 ||
        (isset($_GET['page']) && $_GET['page'] === 'wpide' )){

    Now it loads correctly. However, the editor behaves very odd. Every character I type is doubled in an weird way. I.e., when I type <?php, it is echoed to the screen as <?php<?ph<?<. When you save it, the double characters are saved as well. Plus a vertical scrollbar appeared in the almost-top-left of the editing box. These are other, probably unrelated issues, so I'll report that elsewhere.

    Also, when you create a new file, it has a space in it by default...

  26. Abel Braaksma
    Member
    Posted 2 years ago #

    Note: the startup-checks (STARUP CHECKS ;) ) now always appear when you click the WPide item from Opera, Chrome and IE, but never in Firefox...

    They disappear as soon as you click an item in the file menu.

  27. WPsites
    Member
    Plugin Author

    Posted 2 years ago #

    I've just uploaded version 2.0.7 which checks for an ajax url more inline with your change so that having WordPress installed in a sub directory doesn't break it. It also has a couple of other fixes but nothing related to your other issues I don't think.

    Yes new file seems to just contain a space when initially created which I suppose could mess up a PHP page if that space is left after your php block is closed. Do you think a totally blank page would be better or something else?

    If the editor behaves oddly now, there must be another problem. If you could let me know which browser this happens in that would be great.

    The startup info is only displayed when the editor first loads up (that initial text should not be editable). Once you open a file selected from the file tree then the startup page should be replaced with your first file.

    Thanks for bringing these issues to attention. We wouldn't have got to the bottom of that last one without your persistence. Thanks.

  28. mikegoodstadt
    Member
    Posted 2 years ago #

    Brilliant - now working perfectly!
    Many thanks, Mike

  29. Abel Braaksma
    Member
    Posted 2 years ago #

    If the editor behaves oddly now, there must be another problem. If you could let me know which browser this happens in that would be great.

    I think it's better to continue that discussion in a new post: The editor behaves oddly in Opera (popups stay) and Firefox (doubled chars).

    Do you think a totally blank page would be better or something else?

    In my opinion I think it's best to do the same as with the touch command in *nix or the right-click new file in Windows: create a zero-byte empty file.

    You expand on this and allow for templates that are dependent on file type (like creating a PHP-type file with <?php \n ?>. But that's a feature enhancement.

    The startup info is only displayed when the editor first loads up (that initial text should not be editable).

    Like I mentioned, this is the behavior in all browsers, but not in Firefox. But I think you mean with "first loads" the phrase "when you start WPide". Because it appears every time you start WPide.

    Once you open a file selected from the file tree then the startup page should be replaced with your first file.

    This works as you describe in all browsers I tested (OP, FF, IE, GC).

  30. Abel Braaksma
    Member
    Posted 2 years ago #

    <strike>I don't seem to be able to post new threads. I've asked it off-forum at stack-exchange. Sorry for adding OT-remarks to this post, I'll update when I manage to get my additional posts added (they do appear in my profile, but not in the forum itself...).
    </strike>

    Edit: suddenly my topic re-emerged. Let's continue discussion there.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags