Media upload breaks after pro sites activation

I have a fresh install of WP multisite. After installing pro sites I can no longer add any images to posts / pages. There are no other plugins active. Everything is more or less default. After uploading I get an error message. "Media Library" tab is totally blank.

I made a fresh install due to the same problem on previous development/testing installation. There, I noticed that this problem occured with both Pro Sites and New Blog Templates. I haven't tested NBT on this install though.

  • Krzysztof
    • Site Builder, Child of Zeus

    OK. I've found a solution, but I STILL need info from your plugin developers because... I don't know what I did but it seems to work:slight_smile:

    The thing is that after turning on the DEBUG mode I had the "Undefined property: ProSites::$plugin_file ... in pro-sites.php on line 115". I found the file and deleted lines 115 and 116 and it seemed to resolve the poroblem. The thing is that in this post "https://premium.wpmudev.org/forums/topic/getting-an-error-from-the-pro-sites-plugin" Cheung (post author) was told to disregard the notice which turned out to be the culprit in my situation.

    Please, tell me what I did by removing those lines, what problems can it bring and do a PROPER fix in the next releases.

  • Krzysztof
    • Site Builder, Child of Zeus

    Ok. So now I have the same problem with the "New Blog Templates" plugin. Media Library shows is blank. And I'm getting another error. This time it sais "Strict Standards: Redefining already defined constructor for class blog_templates in ...plugins/blogtemplates/blogtemplatesfiles/blog_templates.php on line 22 "

    Please, don't tell me to disregard the error because I'm not going for this explanation.

  • Krzysztof
    • Site Builder, Child of Zeus

    Update. The text on line 22 in said file was "__construct". In this file there were two instances of this text. I changed them both to "__constructit" and now media upload works!

    Once again, I have no idea why, what problems can it bring. Can you tell me that?

    BTW. My install is based on WP 3.8.1. I haven't tested it on lower versions.

  • Vaughan
    • Support/SLS MockingJay

    Hi @Krzysztof,

    I can't say for sure, but it would certainly break something I would have thought.

    I don't see those on line 22 on my new blog templates though, could I ask what version you are using?

    I'll ask the developer also to take a look at this too.

    Hope this helps

  • Krzysztof
    • Site Builder, Child of Zeus

    Hi there. I'm using the latest NBT version (from today). As for the file you might have mistaken blogtemplates.php with blog_templates.php which is in "blogtemplatefiles" folder. There you'll find the "__construct" texts.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.