On these pages are my WordPress plugins, the odd article and my Support Forum.

For my random rantings on everything else please visit my blog at Yellow Swordfish

WP Plugins


Articles

If you find any of my plugins useful, please comsider a donation towards my running costs.

Thank you

In preparation for the release of the first beta of Simple:Press Version 4.0, the Support Forum has moved to a new site dedicated to the plugin. This will also be the future home for Simple:Press Forum.


Version 3.1.4 will still be available for download here in the short term.


For the support forum - and to visit our new site click on the logo to take you to simplepressforum.com

This forum is currently locked - access is read only
Current User: Guest
Please consider registering

 
Search Forums:


 




500 error

UserPost

8:16 pm
3 Mar 2007


Anonymous Soldier

Guest

1

I’m getting a 500 error when I try to load the admin page, but it’s not the plugin’s fault. Here’s the situation.

As you know from a previous post I run a WPMU site, and I’ve recently added a “Premium Features” feature. As part of the preparation for launching that, I’ve moved the simple-forum plugin from wp-content/plugins to wp-content/premium-plugins.

That new directory functions identically to the regular plugins directory, but it’s only available for blogs which have a certain flag set. In order to keep from breaking things, I had to change the hard-coded references to the plugins directory to premium-plugins.

Simple Forum works just fine, but I can /not/ get sf-admin.php to load because I receive a 500 error when I try now. The link that gets generated under the Manage tab is “http://unsilence.com/simple-forum/sf-admin.php” which doesn’t look right to me. I’ve tried source-diving to see if there’s something I missed, but I don’t see anything.

I’m hoping that it’s not the new premium plugins feature and that there’s something that I need to change in your code. Do you have any ideas of what might be going wrong here?

9:53 pm
3 Mar 2007


Yellow Swordfish

Admin

Peterborough, England

posts 5252

2

You're absolutely right that that is the wrong path. I really don't know where to go for documentation on WPMU - if there even is any! And 'Premium Plugns' is a new one on me altogether!

I think we need to start by trying to find out if admin menus/pages need to be defined differently. The current code performs the following:

add_submenu_page('edit.php', 'Simple-Forum', 'Simple Forum', 10, 'simple-forum/sf-admin.php');

which should result in a path of:

homeurl/wp-admin/edit.php?page=/simple-forum/sf-admin.php

 It sounds to me like there might be something different we have to do. Do yoiu know who to ask or where to go to find this sort of thing out for MU?

10:19 pm
3 Mar 2007


Anonymous Soldier

Guest

3

“Premium Plugins” is new to you, because it is new; however, it is functionally identical to “Plugins” (because my wp-admin/premium-plugins.php is the same file as wp-admin/plugins.php but with a few changes). The path is correct when it’s in wp-content/plugins … it’s only when it’s in wp-content/premium-plugins that it breaks. Might be my implementation of premium plugins then. Crap.

10:25 pm
3 Mar 2007


Yellow Swordfish

Admin

Peterborough, England

posts 5252

4

Well - I think we still need to check the call above…

10:58 pm
3 Mar 2007


Anonymous Soldier

Guest

5

Yellow Swordfish said:

Well - I think we still need to check the call above…



Well, another plugin I have in that directory, wp-slimstat works properly so I took a look at the call it uses. This is its call:

add_submenu_page( ‘index.php’, ‘SlimStat’, ‘SlimStat’, 1, __FILE__, array( &$wpSlimStat, ‘displayStats’ ) );

I added the __FILE__ bit, and wound up with this:

Warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, ‘/simple-forum/sf-admin.php’ was given in /home/unsilenc/public_html/wp-includes/plugin.php on line 123

I do know that WPMU uses the same calls as WP, but I’ll check around on the WPMU forums.



Reply to Topic: 500 error

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 7 + 4        (Required)

Topic Reply:


 
 

About the Stuff at Yellow Swordfish forum

Currently Online:

12 Guests

Maximum Online: 71

Forums:

Groups: 3

Forums: 16

Topics: 2068

Posts: 14091

Members:

There are 1003 members

There are 837 guests


Yellow Swordfish has made 5252 posts

Top Posters:

Mr Papa - 1602

-Radio- - 558

ovizii - 114

jfv - 82

angelic007 - 72

Administrator: Yellow Swordfish | Moderators: Yellow Swordfish, Mr Papa, -Radio-


© Simple:Press Forum - Version 3.1.4 (Build 357)