The MU forums have moved to WordPress.org

Wordpress MU 1.3rc2 (20 posts)

  1. donncha
    Key Master
    Posted 16 years ago #

    Grab revision 1076 from Subversion which will hopefully fix most of the bugs reported earlier.
    I couldn't reproduce the login or tag permalink errors, but I reverted changes to get_userdatabylogin() and changed wp_safe_redirect() so it accepts the $current_site->domain as a safe domain. That will hopefully fix login issues for site_admins.
    Upload space functions have been fixed.

    Registration is now closed by default. There's a big ugly notice on the signup page so any budding site admin will know where to go to turn it back on again.

    The timeline is a good way of checking what has changed.

    Download it by visiting the page below and clicking on the Zip link: http://trac.mu.wordpress.org/browser/trunk?rev=1076

  2. andrewbillits
    Member
    Posted 16 years ago #

    Would it be possible to toss in a filter in the get_space_allowed() function?

    Basically it would be great if we could override the default "allowed space" setting for the site. The current method i'm having to use to do this is a bit of pain when one filter could make life much easier.

    Edit:
    I just realized this line is in there:
    $spaceAllowed = get_option("blog_upload_space");
    I don't know how I missed that before.

    Thanks,
    Andrew

  3. donncha
    Key Master
    Posted 16 years ago #

    If you're feeling really adventurous then take http://trac.mu.wordpress.org/browser/trunk?rev=1078 for a spin.
    Major change in this one is that xmlrpc posting is disabled by default. Why? The spammers are going to hate that.
    Unfortunately anyone who posts pictures from Flickr will too but you can enable it on a blog by blog basis. Yes, it is deliberately hard to do because it should be a site policy and not changed lightly.

  4. lunabyte
    Member
    Posted 16 years ago #

    "Major change in this one is that xmlrpc posting is disabled by default."

    *stunned*

    Wow, D. Wow.

    I just finished putting together my own little hack for this, and now it's going into the core. Super sweet.

    Mine was configured slightly different, based on num_posts and time elapsed since registration, but manual per blog activation sounds good. However, with the Flickr example, wouldn't it be possible to block logins to post, but still allow a Flickr plugin to do its thing?

    Although I am assuming that it's incoming from Flickr, and not something like a plugin grabbing info from Flickr, which if it were incoming from Flickr it could then be used similar to methods now with just another step in their process.

  5. lunabyte
    Member
    Posted 16 years ago #

    Oh, have a note to add to that.

    Wouldn't it possibly make sense to swap some info around in version.php for plugin compatibility?

    Example:

    WP 2.3 version.php

    $wp_version = '2.3';
    $wp_db_version = 6124;

    MU 1.3rc1 version.php

    $wp_version = 'wordpress-mu-1.3rc1';
    $wporg_version = 'wordpress-2.3';
    $wp_db_version = 6124;

    Proposal (MU 1.3 version.php)

    $wp_version = '2.3';
    $wp_mu_version = '1.3';
    $wp_db_version = 6124;

    Not sure how big of a pain that would be on your end, but it sure would help with plugins that do a check for the WP version >= X, which causes it to fail when it gets "wordpress-mu-1.3" for example. OK, so these can be hacked around, but it seems a little silly to do so.

    I guess some plugin authors haven't figured out the magic DB version yet. :(

  6. SteveAtty
    Member
    Posted 16 years ago #

    Its almost moving too fast. I have a busy day at work (well sort of busy) and the code base moves on several revisions before I've had time to install it on a test server!

  7. ktlee
    Member
    Posted 16 years ago #

    To donncha

    New function "get_space_allowed()" that you created
    $spaceAllowed = get_option("blog_upload_space");

    Are you planning to include an input box for "blog_upload_space" in the wpmu-blogs.php edit blog page?
    Cause by default this option doesn't exists, so it will not automatically get pick up by the page.

    I believe that most people use Z-Space, or SpaceManager to handle individual blog upload quota which they just add a blog option field and overwrite the checking upload function. Are you planning to include this feature into core file? But anyway I will start remixing this plugin.

    Upgrade to rev 1078 so far looks pretty nice.
    Haven't encounter any huge problem or bugs. :D

    Great work

    Cheers,
    kt

  8. ktlee
    Member
    Posted 16 years ago #

    Hi donncha,

    regarding to the new blog option field. "get_option("blog_upload_space");"

    You might want to updates function which checks the upload file size in the /wp-include/wpmu-function.php

    Right now, the upload quota checking is reflect to the global upload quota not the individual upload quota.

    line 1607
    $spaceAllowed = get_site_option("blog_upload_space");
    to
    $spaceAllowed = get_space_allowed();

    here is my approach to the wpmu upload quota. Put it in mu-plugins folder
    http://demo1.dev.ikazoku.com/wp-content/mu-plugins/ikazoku-qutoa.phps
    feel free to use it. =)

    Here is what it does:
    - Display blog Quota under Dashboard
    - Add upload_blog_space field to "Misc Blog Actions" under editing individual blogs.
    - List individual blog quota under Site Admin->Blogs

    kt

  9. new-net
    Member
    Posted 16 years ago #

    I'm running PHP5.2 and Mysql5.1 and trunk rev1078

    I get a couple of 500 Internal server errors, so far on wp-login.php and wp-admin/options-general.php wp-admin/edit.php (when 'Manage' > 'Posts')

    It seems only to happen on these pages.

    A quick check on apache logs show a couple of 'Cannot allocate memory'

    My memory limit is set to 128M in php.ini
    Should i increase it (?)

  10. demonicume
    Member
    Posted 16 years ago #

    lets give her a spin and see what happens! maybe i'll forward whiny user emails to doncha! LOL. great work, BTW.

  11. dsader
    Member
    Posted 16 years ago #

    I have a nonvhost install and any user using the blog1 login to log into their blog creates a "too many redirect" error.
    http://trac.mu.wordpress.org/ticket/427

  12. dsader
    Member
    Posted 16 years ago #

    When changing options at SiteAdmin Options, throws error
    "406"

  13. donncha
    Key Master
    Posted 16 years ago #

    lunabyte - wrt Flickr posting via XMLRPC. I checked the logs of my photoblog, http://inphotos.org and the user agent is "Flickr" but it uses multiple IPs so it's not easy to just allow Flickr. Your best bet is setting the blog option manually.

  14. andrewbillits
    Member
    Posted 16 years ago #

    ktlee,

    You need to make a modification to your plugin so that if a quota gets lowered and they have actually used more space than allowed, the graph will still look ok.

    Basically replace this:

    $pct = round(($size / $quota)*100);

    with this:

    $pct = round(($size / $quota)*100);
    if ($size > $quota){
    	$pct = '100';
    }

    Donncha,
    If you added in his plugin then the same edit probably needs to be made.

    Thanks,
    Andrew

  15. donncha
    Key Master
    Posted 16 years ago #

    Thanks Andrew - just modified my own bit of code to add yours.

    I found a bug in get_blog_option() which was fixed in http://trac.mu.wordpress.org/changeset/1090

    Instead of returning "falsevalue" it'll return the boolean value false.
    ktlee used "falsevalue" in his plugin, but get_blog_option() wasn't supposed to return that, it's supposed to be used internally by the cache to store a value of false.

    So, if you use get_blog_option() and check for "falsevalue" you'll need to check for the bool false instead.

  16. donncha
    Key Master
    Posted 16 years ago #

    dsader - 406 means the content to be sent to the browser is "Not acceptable" according to http://www.checkupdown.com/status/E406.html

    Do you have any international characters in your site options page?

    I also updated bug 427 if you could check that.

  17. donncha
    Key Master
    Posted 16 years ago #

    new-net - do you have a lot of blog options in the blogs affected? Maybe too much data is being autoloaded. Do you use an rss widget and have a lot of them? Might be the cached rss ..
    Sounds like you will have to increase the memory usage.

  18. ktlee
    Member
    Posted 16 years ago #

    Donncha,
    I see that falsevalue got changed. Looking Good.

    Andrewbillits,
    Thanks for the improvement. I will remove the plugin from here*.

    * There is a copy in trac if you want to play with it.

    Thanks
    kt (Gordon)

  19. new-net
    Member
    Posted 16 years ago #

    donncha: After further checkings, the memory limit was an issue on our www cluster, one of the node had its httpd behaving weirdly due to a cron overflow.

    128M is, i guess, more than enough (10 blogs tops, no rss)

  20. donncha
    Key Master
    Posted 16 years ago #

    new-net - good to know. memory limit has been an issue before too!

About this Topic