bbPress
-
Seems as you have not think about installations using bbPress. I have one database with many Posts, bbPress, buddyPress, many topics and replies, users. Whole database is 40-50 MB. But Plugin Organiser makes a table with mind blowing, compared to rest of database, 430 MB. There is no real case scenario where people will regulate PO and forum on topic by topic, or reply by reply, basis. Can you make your plugin to ignore bbPress, buddyPress links and regulate things only by post type. It is really killing any bbPress installation. Thanks.
-
Unless you set something on the post/page/post type an entry isn’t made in the po_plugins table. So I’m not sure how your table would get that big without you going to each individual page/post/post type and setting a plugin to off.
I’m running bbpress and buddypress and it isn’t adding an entry for all topics and replies.
If you go to the po settings page you can disable it for the forum and reply post types. Those are bbpress post types. I forgot about the post type settings that create an entry for every post in the po_plugins table if you have set something on the post type plugins page. The reason an entry is made in the po_plugins table for every url that needs to disable/enable a plugin is because the wordpress core is not loaded at the time that the PO mu plugin is ran. It needs to run before the core is loaded because that is when the plugins are loaded. There is no other way to do it. So a separate table is needed with entries for the url and the list of plugins to be loaded on that url.
I disabled it. I can use URL wildcard when disabling files on forum pages I guess like: “forums/topic/*”
Table remians huge, how to clean it.
I will mark this as (half)solved.
Can uninstall plugin, delete table, install it again. Not big deal. But it should not be this way, not near. Real life has nothing to do with this logic.
There is no way you can have real case scenario where someone will need to disable say CF7 files in one forum topic named “David Cameron”, and have it in other forum topic named “Barack Obama”.
First there is no logic for it. Second maybe more important, there is no such crazy person who would go through thousands of forum topics and do such crazy thing. I wont mention replies here, it would be mega crazy thing.
There’s a button on the post type settings page that you can use to remove all of the settings for that post type from the database. It says “Reset settings for this post type”. This plugin does not consider what other plugins do. That is a specialization and out of the scope of this plugin. There are thousands of plugins out there and I can’t code specifically for all of them. There is logic for having one plugin allowed on a specific post but not another.
I did this for all post types. Nothing from table was removed.
bbPress is not “other plugin”. It is core plugin much so.
Dont know how it ends in table, did nothing special.Plugins aren’t part of the core. They are added functionality outside of the core functionality of wordpress. If you didn’t go to the post type settings page and set something on that page for the replies or forums post type then I’m not sure how they would have ended up creating an entry in the po_plugins table. The way things are stored in the table is because of limitations created by having to work outside of wordpress in the MU plugin. Posts don’t exist before the core is loaded so I can’t use post meta. It has to be stored with a separate entry for each url you want to change. And every url has to store the list of plugins disabled/enabled. So it creates a lot of overhead. I’ve thought of using a separate table to store lists of plugins so that everything isn’t stored in one table. But that creates it’s own problems of efficiency. There are reasons behind the overhead.
Ok so I did some testing. I entered 1000 rows into my table on my test site and it is taking up 260kb. You have 13000 rows taking up 430 mb. Why is your engine set to innodb only on that table? You should try setting it to myisam like the rest of your database. Innodb has a lot of overhead. I changed mine to use innodb and the size increased to 700kb.
It is because of you capital letters “PO” in table name. π
I made this empty table manually.That’s weird. The capital letter didn’t make my tables use innodb. Either way. Change it to myisam.
Oh. Nm. I get what you are saying.
Jeff, dont worry. If all developing problems was like this. Singing a song.
Just trying to push you a bit to ignore bbPress. You know how it goes, each reply is a Post and even low level forums have them thousands and thousands. Make your plugin ignore bbPress / buddyPress at whole. For rest we can use wildcards.
Even if User (me) did something wrong and generated huge table it is difficult to remember what is done one year ago.
You can set PO to ignore buddypress completely by going to the PO settings page and unchecking the buddypress post types in the custom post type support box. For buddypress the post types are forum, topic, and reply.
The topic ‘bbPress’ is closed to new replies.