WordPress.org

Forums

Self Hosted Plugins
[resolved] Need Help with a Couple of Issues (45 posts)

  1. joshmac
    Member
    Posted 4 years ago #

    I just installed this plugin and I have two issues I am hoping someone can help me resolve. One is how do I get it to show the plugin name on the plugins page instead of just the default name "Plugin Name"? Also, when you click on the plugin, it takes you to where you should go, but there is a 404 error. My plugins page is located here: http://www.joshparker.us/plugins

    http://wordpress.org/extend/plugins/self-hosted-plugins/

  2. topquarky
    Member
    Plugin Author

    Posted 4 years ago #

    Hi Josh,

    For the first question, it takes the name of the plugin from the first line of the readme.txt file. Your file probably still has "Plugin Name" there.

    For the second question, there is most likely a rewrite rule that is taking precedence over the Self Hosted Plugins rules. There's no quick way to debug at this time - when I was developing it I put a var_dump in the wordpress core files. I'll look up what I did when I get back to my computer (later tonight).

    There is a way to turn off that rewrite. See the frequently asked questions for the plugin and try that to see if it works.

    Thanks for trying the plugin out. It's still in early stages of development and it's great to track these issues down.

    Cheers
    Topquarky

  3. joshmac
    Member
    Posted 4 years ago #

    Thanks. Yes, it has "Plugin Name: WP aMember Dashboard Widget". So, the first line should only be "WP aMember Dashboard Widget"? I will check out the rewrite part and see if I can turn it off.

  4. joshmac
    Member
    Posted 4 years ago #

    Actually, If I only have "WP aMember Dashboard Widget" without "Plugin Name:", I get a missing header message.

  5. topquarky
    Member
    Plugin Author

    Posted 4 years ago #

    Make sure the format is proper. == My Plugin == should be the first line there.

    If you're still having problems you can send me your readme.txt. t _at_ topquark _dot_ com.

  6. joshmac
    Member
    Posted 4 years ago #

    Thanks, that did it.

  7. topquarky
    Member
    Plugin Author

    Posted 4 years ago #

    There's also the readme validator. But if you're getting an invalid plugin error, that's in the main plugin php file.

  8. topquarky
    Member
    Plugin Author

    Posted 4 years ago #

    Great!

  9. topquarky
    Member
    Plugin Author

    Posted 4 years ago #

    For debuggin the rewrite problem, take a look at the WP::parse_request method. That's where it happens. The global $wp object has a var called $wp->matched_rule that will get set to the rule that matched. Examine that one your 404 page.

    The rewrite rules match on a first-come-first-served basis, so if the rule that matched is before the self-hosted-plugins rules, then that'll match. However, (because I found this in my testing), I added a filter called 'shp_offending_patterns'. Look at the function shp_rewrite_rules in self-hosted-plugins.php. You can use that to move the offending pattern to the end of the rules array, thereby making the s-h-p patterns come first, thereby (hopefully) causing your extend/plugins/my-plugin page to show properly.

    Cheers
    Topquarky

  10. joshmac
    Member
    Posted 4 years ago #

    Ok, I will try it out.

  11. joshmac
    Member
    Posted 4 years ago #

    No matter what I try, it still doesn't work. Even commenting out the rule set doesn't return an error or anything different.

  12. topquarky
    Member
    Plugin Author

    Posted 4 years ago #

    Hmmm.

    Have you tried it in twenty-ten? Or disabling some other plugins?

  13. joshmac
    Member
    Posted 4 years ago #

    No, I haven't tried that theme or disabling plugins. I will try that and see what happens.

  14. topquarky
    Member
    Plugin Author

    Posted 4 years ago #

    Hi Josh,

    I had another thought. Try changing the slug of your plugins page to something other than 'plugins' (i.e. 'my-plugins'). Let me know if that does anything.

  15. joshmac
    Member
    Posted 4 years ago #

    Changing it did nothing differently.

  16. joshmac
    Member
    Posted 4 years ago #

    Switching to the Twenty Ten theme did not fix the issue either. I am on an Nginx server if that help.

  17. topquarky
    Member
    Plugin Author

    Posted 4 years ago #

    Hi Josh,

    I don't think it should be anything to do with the server. Did you try disabling some plugins?

    This is a doozy.

  18. joshmac
    Member
    Posted 4 years ago #

    I did disable some, but I will go back and disable all of them to see if that makes a difference.

  19. joshmac
    Member
    Posted 4 years ago #

    Ok, disabling all the plugins didn't work either.

  20. topquarky
    Member
    Plugin Author

    Posted 4 years ago #

    Hi Josh,

    I've just uploaded version 1.0.8. In that version, I changed the rewrite rules such that the self-hosted-plugins rules come first, thereby taking precedence.

    Let me know if that fixed your issue.

  21. joshmac
    Member
    Posted 4 years ago #

    Thanks for the update, but unfortunately, it did not fix the issue: http://www.joshparker.us/plugins

  22. topquarky
    Member
    Plugin Author

    Posted 4 years ago #

    Hi Josh,

    Is there any chance you could let me in there to take a look? Let's get to the bottom of this. WP Admin access would be okay, FTP access would be better (so I can get in there, check error logs, add some debug code, etc).

    If you're obliging, email me credentials to t _at_ topquark _dot_ com

  23. topquarky
    Member
    Plugin Author

    Posted 4 years ago #

    Hi Josh,

    I figured it out. It turns out the readme.txt file led you astray. The bit about disabling the 'extend/plugins' feature by adding add_filter('shp_enable_redirect',create_function('$a','return false;')); breaks the whole shebang (told you it was beta).

    I removed that add_filter call from your functions.php file and voila, it works now.

    I'll work on fixing the plugin so that filter has the effect it's supposed to, but in the meantime, leave it enabled and you should be good to go.

    Thanks for following through with me until we figured it out.

    Cheers
    Top Quark

  24. joshmac
    Member
    Posted 4 years ago #

    Thank you, thank you, thank you. I am really happy to have the option of hosting plugins on my site like WordPress. Are you taking donations?

  25. topquarky
    Member
    Plugin Author

    Posted 4 years ago #

    Great! Glad we got it working.

    Donations are definitely appreciated. You can send to paypal _at_ topquark _dot_ com.

    Thanks Josh, and good luck

    Cheers
    Top Quark

    p.s. On my own site, I was able to hook it up so that I've can charge for the plugins hosted by self-hosted-plugins and only allow authenticated updates. I'll get a forum post up on how I did it eventually, but just a teaser to what's possible.

  26. joshmac
    Member
    Posted 4 years ago #

    oooh, I like.

  27. nzildjian03
    Member
    Posted 4 years ago #

  28. topquarky
    Member
    Plugin Author

    Posted 4 years ago #

    @nzildjian03

    Um...

    off topic?

  29. nzildjian03
    Member
    Posted 4 years ago #

    @topquarky

    i posted my plugin issue last 50 mins.
    but no one helps me.
    can you please help me sir?
    the issue is about nextgen gallery.
    thanks.
    i will highly appreciated ur help.

  30. topquarky
    Member
    Plugin Author

    Posted 4 years ago #

    @nzildjian03

    Why did you post in this forum? This is for the plugin Self Hosted Plugins. I know nothing about NextGen and cannot help you.

    Good luck.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic