Jump to content
Sign in to follow this  
dawudraamah

Multiple (duplicate) Features post

Recommended Posts

dawudraamah

"Filter Posts in Pages" plugin is causing duplicate Features posts and box posts. It does not effect the regular frontpage post however. By the time I caught it I had thousands of boxes and feature posts. I would say the plugin has a bug, but it does not effect the regular WP regular post? If there is a fix I would be interested Thank you in advance. Enjoy the day

Share this post


Link to post
Share on other sites
catrina

Have you tried deactivating other plugins you have (one by one) to see if any of them could be causing the problem?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
imaner

I'm having exactly the same problem with this on a live site. I had over 20,000 feature 'posts' duplicated. I need to delete features entirely, however everytime I delete them the default 5 re-appear along with the category and then start duplicating again! How can I remove all features and boxes permanently? Or has anyone else come across this issue and has a fix?

Share this post


Link to post
Share on other sites
imaner

Catrina No this was a straight install on the latest version. It's on a live site. I'm going to have to get to the bottom of it and find out exactly when the feature and boxes posts are duplicated. However in the meantime I'm after a way of removing them permanently (because if there were no posts of either of these types then they could NOT be duplicated). My feeling is there must be a duplicate function call that is used by both plugins. It's a real pain as this site totally relies on showing posts in pages filtered by category (it's the foundations!). It would be really helpful if one of the pagelines team or anyone else could point me to the code that creates the default instances of the features and boxes, as I want to remove this as a starting point! Cheeers Andy

Share this post


Link to post
Share on other sites
Simon

Andy, fix incoming...

Share this post


Link to post
Share on other sites
imaner

Cheers Simon, it's the first of the month so my morning is tied up and knowing that you're on the case is a GREAT help! Many thanks.

Share this post


Link to post
Share on other sites
Simon

Right, fix is simple ;) Create folder `wp-content/mu-plugins` create a file in that folder `del_features.php` put into that file: `<?php` `add_filter('pagelines_default_boxes', '__return_null' );` `add_filter('pagelines_default_features', '__return_null' );` Reason it has to be a plugin, the defaults get loaded before child theme functions file is parsed, plugin files are always loaded first :)

Share this post


Link to post
Share on other sites
imaner

I'll give it a whirl within the hour :-) and report back! Meanwhile I've got nearly 90,000 post meta's to sort out!

Share this post


Link to post
Share on other sites
Simon

lol seems like a job for phpmyadmin ;)

Share this post


Link to post
Share on other sites
imaner

Simon OK I tried this and it's not doing the trick. I'm testing it on the features. I'm wondering if the feature sets is also interfering with this: 1) Delete feature sets(only one called default-features) - this deletes OK, 2) Delete 5 default features. 5 move to trash and 5 re-created PLUS the feature set default-features reappears? I have done this with the 'List category posts' plugin active AND deactivated with the file below added: wp-content/muplugins <?php /* AW: file used to stop creation of pagelines pro default boxes and features which were being duplicated by post on a page plugin */ add_filter('pagelines_default_boxes', '__return_null' ); add_filter('pagelines_default_features', '__return_null' ); ?> Any thoughts? Andy

Share this post


Link to post
Share on other sites
Simon

its mu-plugins not muplugins ;) rename your folder, trust me it does work!

Share this post


Link to post
Share on other sites
imaner

OK I changed that and now get a 404 from admin with following errors (which don't get if remove the file!): Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '__return_null' was given in /home/iasjorg/public_html/wordpress/wp-includes/plugin.php on line 166 Warning: array_reverse() [function.array-reverse]: The argument should be an array in /home/iasjorg/public_html/wordpress/wp-content/themes/platformpro/sections/features/section.features.php on line 611 Warning: Invalid argument supplied for foreach() in /home/iasjorg/public_html/wordpress/wp-content/themes/platformpro/sections/features/section.features.php on line 614 Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '__return_null' was given in /home/iasjorg/public_html/wordpress/wp-includes/plugin.php on line 166 Warning: array_reverse() [function.array-reverse]: The argument should be an array in /home/iasjorg/public_html/wordpress/wp-content/themes/platformpro/sections/boxes/section.boxes.php on line 354 Warning: Invalid argument supplied for foreach() in /home/iasjorg/public_html/wordpress/wp-content/themes/platformpro/sections/boxes/section.boxes.php on line 356

Share this post


Link to post
Share on other sites
imaner

PS If I leave the file in I can't use admin at all :-(

Share this post


Link to post
Share on other sites
Simon

LOL sorry about that, i didnt have debug on when i tested ;) here is the correct filters: add_filter('pagelines_default_boxes', create_function( '', 'return array();') ); add_filter('pagelines_default_features', create_function( '', 'return array();') );

Share this post


Link to post
Share on other sites
imaner

Houston, we have arrived! :-) Finally got rid of all those pesky features and boxes ;-). Cheers Simon. Just one other thing regards my 90,000 pieces of postmeta which are no longer linked to them feature and box posts - is the meta info like feature-thumb used anywhere other than in features and likewise feature-anything plus the box met is that just the_box_icon ?? I don't want to screw the database up by removing postmeta that is used in other places. Thanks for getting me this far. Andy

Share this post


Link to post
Share on other sites
Simon

apart from feature-sets and possibly the taxonomy i think your safe to nuke, but of course, your making backups im sure ;)

Share this post


Link to post
Share on other sites
imaner

yes, have been making backups! Just one thing to say on this. I hadn't noticed the duplication of posts (features/boxes) because these elements were not being used on the site. However I had noticed a significant speed reduction on the site and was looking at caching plugins (specifically W3 Total cache). I was surprised at how long the cache was taking to create and thought I'd investigate the database - at which point I was surprised to see almost 22,000 posts 85,000 post metas and 20,000 term relationships (99% of which I had not created). I've seen people on the forum discussing how size affect speed using pagelines platform pro and all I can say is that it does continue to work, albeit slowly (maybe 9 sec page loads) at this size database. However even with caching on sites of this size the page load can be reduced to less than 1 sec using W3 Total cache (with page cache and css/js minification only) and if you are mainly using WordPress as a CMS without too much dynamic content then using pagelines pro with the base template overrides and 30 plugins is still a very good way to go, even with 20,000 'pages'! Looking forward to being able to output posts in pages via Pagelines Pro itself in future. Meanwhile I hope to try and find the issue with this plugin, as I may actually want features and boxes one day.

Share this post


Link to post
Share on other sites
eleake
I've had the exact same issue but am a little confused on the solution. I created a plug in and installed to WP through the Add Plugin, Upload process. The plugin activates, but I do not see it listed and it has no effect. Pretty sure I'm doing something wrong here. Thanks for the help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×