The MU forums have moved to WordPress.org

eShop beta for MU << serious help + testing needed (24 posts)

  1. RavanH
    Member
    Posted 16 years ago #

    Hi,

    Rich, the developer of the e-commerce plugin eShop has been working hard - with a little help from me and Mattz - to make his plugin compatible with WP_MU. Read more on http://www.quirm.net/page.php?id=39 and but do not use that (stable) version as it is for WP only... He intends to make the new version publicly available as soon as it works fine. So if anybody cares to join the effort? Testers wanted :-)

    The latest beta (really an alpha at this point) can be found on http://www.quirm.net/punbb/viewtopic.php?id=148&p=6#p969 (for testing purposes only !! read on...)

    I have the impression we are nearly there, except for one SERIOUS problem. As Rich is not familiar with WP_MU, I have tried to explain as simple as I could what is going wrong on http://www.quirm.net/punbb/viewtopic.php?id=148&p=6#p967 but I will try to be more informative below.

    I hope some of the guru's on this forum can shed some light on this issue.

    REPRODUCING
    1. On a clean install of WP_MU 1.3.3 (in my case subdirectories, not subdomains) upload eShop beta to the /plugins/ directory.
    2. Activate it on the main blog
    3. Go to Site Admin > Blogs and create a new blog at the bottom

    WHAT HAPPENS?
    On my setup, the database tables for the new blog are not created.

    In my log files I see (abbreviated the last log entries):

    WordPress database error: [Table
    'wpmu_test.wp_2_posts' doesn't exist]\nSELECT * FROM wp_2_posts\n,
    referer: http://free-jazz.net/wordpress-mu-1.3.3/wp-admin/wpmu-blogs.php
    
    install_blog - ID: 2  URL: http://free-jazz.net/wordpress-mu-1.3.3/test/
    Title: test , referer: http://free-jazz.net/wordpress-mu-1.3.3/wp-admin/wpmu-blogs.php
    
    WordPress database error: [Table
    'wpmu_test.wp_2_options' doesn't exist]\n
    INSERT INTO wp_2_options (option_name, option_value, autoload) VALUES ('WPLANG', '', 'yes')\n, referer: http://free-jazz.net/wordpress-mu-1.3.3/wp-admin/wpmu-blogs.php
    
    WordPress database error: [Table
    'wpmu_test.wp_2_options' doesn't exist] ...

    Notice that the first error is from checking whether the new blog tables already exsist. They do not, so this is correct behaviour. Then the second entry shows the install_blog message. But all errors after that are showing that the tables for blog ID 2 have not been created !

    To get more info, I have inserted at the end of function make_db_current_silent() (/wp-admin/incluses/upgrade.php starting at line 1062) two lines that create more error logs:

    error_log($wp_queries, 0);
    
    foreach($alterations as $alteration) error_log($alteration, 0);

    The error log created by that first line clearly shows that the function is attempting to create tables for the main blog, not for the new blog (abbreviated the log entry):

    CREATE TABLE wp_1_terms (\n term_id bigint(20) NOT NULL auto_increment,\n name varchar(55) NOT NULL default '',\n slug varchar(200) NOT NULL default '',\n term_group bigint(10) NOT NULL default 0,\n PRIMARY KEY (term_id),\n UNIQUE KEY slug (slug)\n) DEFAULT CHARACTER SET utf8;\nCREATE TABLE wp_1_term_taxonomy [...]

    The second line results in :

    Changed type of wp_1_posts.post_status from enum('publish','draft','private','static','object', 'attachment','inherit','future','pending') to enum('publish','draft','private','static','object', 'attachment','inherit','future',, referer: http://free-jazz.net/wordpress-mu-1.3.3/wp-admin/wpmu-blogs.php?updated=true&action=add-blog

    So what I can figure from this, is that up until the call make_db_current_silent() from function install_blog in wp-includes/wpmu-functions.php on line 1290 , all goes well (switching to the new blog ID and checking for existence of database tables)... But at that point, when the routine goes to function make_db_current_silent() and from that to function dbDelta() using the global value $wp_queries as input, all falls to pieces...

    WHEN DOES IT NOT HAPPEN?
    Just disabling the eShop beta plugin, will solve the issue. I am not running any other plugins on my test setup of WP_MU 1.3.3 . So clearly, something in the plugin is causing it.

    WHY?
    Can it be that the plugin somehow cause the 'old' $wpdb or $wp_queries values from before the function switch_to_blog to get back in the game again? How is this possible ?

    Anybody any ideas?

    THANKS for helping the first public e-commerce plugin for MU come to live !!

    --Allard

  2. demonicume
    Member
    Posted 16 years ago #

    are you dropping this in mu-plugins or plugins?

  3. demonicume
    Member
    Posted 16 years ago #

    i've seen WP plugins that have issues because they may be activated when dropped in mu-plugins, but tables don't get created. i have't had a chance to dig thru all the links, but you might wanna check that out.

  4. RavanH
    Member
    Posted 16 years ago #

    No, this is (as i described under REPRODUCING) in the plugins dir ...

    Wouldn't dream of putting a plugin like this in mu-plugins!

  5. RavanH
    Member
    Posted 16 years ago #

    I think I narrowed it down to /wp-admin/includes/upgrade.php being included in the plugin. This apparently will disrupt the Create Blog process while it uses functions in that same file too... ?

    To me it is strange that while the file in the plugin is included with require_once so to my non-programmer little brain it seems that it should not be included twice. But then I would be surprised if it really IS included twice as that would cause a whole bunch of "function already defined" errors, would it not?

    How bizarre... Can anyone explain this to me?

  6. RavanH
    Member
    Posted 16 years ago #

    Anyway, the beta seems to work now... All we need is MU users interested to test :)

    Please get the beta from http://www.quirm.net/downloads/wpress/eshop-beta.zip

    Bug reports and improvement suggestions can be done on http://www.quirm.net/punbb/viewforum.php?id=9

    Thanks :)

  7. PBO
    Member
    Posted 16 years ago #

    Is this paypal integrated?

  8. awarner20
    Member
    Posted 16 years ago #

    @ RavanH,

    I have installed eShop and I am testing now. I'm going to take some time and read through the documentation. I'm running 1.5.1.

    EDIT:

    I just activated the plugin and none of the pages were created automatically as referenced in the documentation...still exploring.

  9. awarner20
    Member
    Posted 16 years ago #

    It appears eShop and the Plugin Manager ( http://wpmudevorg.wordpress.com/project/Plugin-Manager )are not friends.

    Plugin Manager hasn't been updated since 7/26/2006.

    I have the plugin menu disabled from my user blog backend via the Site Admin-->Options-->plugins. I am activating plugins on a blog-by-blog basis using the Plugin Manager. However, with the eSHop plugin, there are supposed to be some pages created upon activation and that doesn't happen.

    When I enable the plugins menu for user control and then activate the eShop plugin, everything happens as expected.

    It seems that the Plugin Manager is preventing the auto-creation of pages and I would guess that it's because this plugin is out-of-date.

    Can anyone else confirm the same?

    Is there anyone here who might have an idea of what needs to be done to update this plugin? It seems to me, with over 4,000 downloads that this is a very popular and useful plugin.

    I'd also like everyone here to know that the eShop plugin developer was very quick to assist in my troubleshooting today:)

  10. demonicume
    Member
    Posted 16 years ago #

    hey awarner20, give plugin commander a try and see if you get the same error

  11. MrBrian
    Member
    Posted 16 years ago #

    Yeah, plugin manager is an old dinosaur and quite inferior to omry's plugin commander.

    http://mu.wordpress.org/forums/topic.php?id=8663

  12. awarner20
    Member
    Posted 16 years ago #

    Hey guys,

    Please correct me if I'm wrong, but as far as I know, there is no way for Plugin Commander to allow me to activate a plugin on a blog-by-blog basis while still keeping the plugins menu hidden from my users.

    I do have both installed.

  13. demonicume
    Member
    Posted 16 years ago #

    oh, i see - youre doing the blog-by-blog thing because you want to. that kinda changes what i thought you meant.

  14. MrBrian
    Member
    Posted 16 years ago #

    Well you can remove the code in plugin commander that adds the menu and then just activate plugins on a blog-by-blog basis... I don't see the problem your having.

  15. Ovidiu
    Member
    Posted 16 years ago #

    also plugin commander allows you to activate plugins on a blog by blog basis.
    while being logged in as the admin, go to the plugin menu of plugin commander in another than your main blogs backend, and you'll see a color coded difference between plugins that are under user control and plugins that are not. meaning you as an admin can activate plugins that are not under user control.

  16. awarner20
    Member
    Posted 16 years ago #

    Ovidiu,

    Thanks for your advice, but it's a no go. I'm not sure I'm being understood correctly, or maybe I am completely blind, but...
    ...I see NO WAY to enable plugins on a blog-by-blog basis using Plugin Commander while keeping all plugin menus hidden from users.

    I have attached a screenshot of my Plugin Commander screen HERE. As I see it, I have these choices...

    Auto activation

    When auto activation is on for a plugin, newly created blogs will have that plugin activated automatically.
    this does not effect existing blogs

    User control

    When user control is enabled for a plugin, all users will be able to activate/deactivate the plugin through the Manage->Plugins menu.

    This menu will only appear if there is at least one plugin with user control enabled.

    Note: if you want to use this, be sure to disable the built-in plugins menu from Site Admin->Options->Menus to prevent users from activating plugins which should not be under user control

    Mass activation/deactivation

    Mass activate and Mass deactivate buttons activate/deactivates the specifiied plugin for all blogs. this only effects existing blogs.

    Again, my intention is to keep all plugin menus hidden from all blog owners. Some are set to be activated when a new blog is created. The others will be activated on a per-blog basis by request (with still keeping the plugins menu hidden).

    More thoughts on this please...

    As an aside, how many of you give blog owners "user-control" over their plugins and how many of you keep plugins menus hidden at all times?

    My intention on keeping the plugin menus hidden is not be be secretive, but to remove one step from the blog owner's setup by just having a new menu item there at all times without having to activate it.

    Am I on the wrong path?

  17. andrea_r
    Moderator
    Posted 16 years ago #

    My users see the plugins menu. I explain it as optional additional features.

    If you mostly want to set up auto-enable for plugins, you should be able to do that, and still have the plugins box unchecked. even without the menu item the plugins will still run.

    I haven't done it with the plugin commander/manager tho.

  18. awarner20
    Member
    Posted 16 years ago #

    Thanks for the reply andrea_r,

    I do have some plugins auto-enabled, and I do have the plugins box unchecked, and that works great for my needs.

    However, some plugins will need to be activated by me, after a blog users makes a request. These are the plugins that I do not want auto-enabled, and the blog owner does not have the ability to activate/deactivate because of the plugins menu being hidden (on purpose).

    So, this brings me back to my original question regarding the eShop plugin and the Plugin Manager plugin.

    From above:

    I have the plugin menu disabled from my user blog backend via the Site Admin-->Options-->plugins. I am activating plugins on a blog-by-blog basis using the Plugin Manager. However, with the eSHop plugin, there are supposed to be some pages created upon activation and that doesn't happen.

    When I enable the plugins menu for user control and then activate the eShop plugin, everything happens as expected.

    It seems that the Plugin Manager is preventing the auto-creation of pages and I would guess that it's because this plugin is out-of-date.

    Can anyone else confirm the same?

    Is there anyone here who might have an idea of what needs to be done to update this plugin? It seems to me, with over 4,000 downloads that this is a very popular and useful plugin.

    As an additional side note, I have found the QuickShop plugin to work just fine, but after looking at eShop, it may be more fitting with my user's needs.

    Looking forward to more thoughts on this. Not only for myself, but also for any MU noobs that might read this in the future, it took me some time to get my head around the capabilities of both of these plugins and what they each do separately and together. I think my situation is an example of why someone would need these two plugins together.

    Maybe there's a possibility that Plugin Commander might have some of Plugin Manager's capabilities built-in at some point in the future?

  19. MrBrian
    Member
    Posted 16 years ago #

    However, some plugins will need to be activated by me, after a blog users makes a request. These are the plugins that I do not want auto-enabled, and the blog owner does not have the ability to activate/deactivate because of the plugins menu being hidden (on purpose).

    I'm not 100% sure i understand what your saying still. Am i understanding right that you want to control what plugins are auto-activated, activate plugins on a blog-by-blog bases, and hide all the plugin menus from the users? Just make plugin commander hide the plugins menu from users and shows it to siteadmins using the is_site_admin() function.

  20. awarner20
    Member
    Posted 16 years ago #

    MrBrian,

    I really appreciate your continued attention to this thread.

    You said:

    Am i understanding right that you want to control what plugins are auto-activated, activate plugins on a blog-by-blog bases, and hide all the plugin menus from the users?

    The answer is yes, that's what I'm currently doing with the combination of the plugin manager and plugin commander.

    I understand what your aiming at with using the is_site_admin() function, but I don't understand how this would allow me the same functionality of activating/deactivating a plugin on a per blog basis.

  21. andrea_r
    Moderator
    Posted 16 years ago #

    "I don't understand how this would allow me the same functionality of activating/deactivating a plugin on a per blog basis. "

    Because then you're the only one who will see it to activate/use it. :)

  22. MrBrian
    Member
    Posted 16 years ago #

    Exactly what andrea said. You do know you can access your user's blog backend? Go to site admin->blogs, find their blog, and click "Backend". Also, do you know how to edit plugins and understand PHP?

  23. awarner20
    Member
    Posted 16 years ago #

    @ andrea_r,

    Ok, ok...I get it now...

    @ MrBrian,

    Yes, I know how to get to the user blog backend. My line of thinking was that you two were telling me that I could activate/deactivate from the Plugin Commander menu...I was confused, oh so confused!

    Also, I know a bit about editing plugins and PHP. Obviously I have room for improvement;)

    I will try and get the is_site_admin() function check in there and working.

    Thanks to all for your assistance and patience...

  24. awarner20
    Member
    Posted 16 years ago #

    I can't believe what an idgit I was being. It's apparent to me now that I wasn't clear on all the functions and capabilities of the Plugin Commander plugin from the very start.

    Again, thanks to you all for helping me work through my confusion:)

About this Topic

  • Started 16 years ago by RavanH
  • Latest reply from awarner20