Wil
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: user_can_richedit filter and HTMLDoesn’t seem to matter which filter I use, the results are always that the textarea closing tag is removed.
add_filter( 'parse_query', 'filter_post_edit_screen' ); function filter_post_edit_screen($query) { global $pagenow, $post; if (is_admin() && ( $pagenow=='post.php' && $_GET['action']=='edit' ) ){ add_filter('user_can_richedit','__return_false'); } return $query; }Forum: Fixing WordPress
In reply to: user_can_richedit filter and HTMLThanks Chris.
It’s bundled as part of a plugin so I need to add the filter to something that runs when being edited in the Admin dashboard.
I’m also reading a meta_value from the current post, so I also need a hook that will give the the current page ID.
Forum: Plugins
In reply to: [NextScripts: Social Networks Auto-Poster] Broken plugin after updateYup same – v2.6.3 is broken
Plugin could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected $end in I:\projects\limecanvas\www\wp-content\plugins\social-networks-auto-poster-facebook-twitter-g\inc-cl\fb.php on line 393
I’ve reverted back to 2.5.0 from their own website until they can release 2.6.4
Forum: Plugins
In reply to: [Simple Lightbox] Plugin is very resource intensiveThanks for replying.
It all came about from looking into why our page loading speed was slow.
I ran some pingdom tests and found that the initial wait time was super slow.
That led me to analyse just what WordPress was doing in its initialisation, so I fired up P3 (Plugin Performance Profiler).
It identified 4 plugins that were eating up a lot of resources on page loads, Simple Lightbox being one of them.
So I set up a blank 3.5.1 test server and ran the tests with and without the plugin to see the performance difference.
It was quite noticeable.
Here are the images from the test:
1. Vanilla 3.5.1 site with Genesis, WordFence and XCloner
http://limecanvas.net/test/wp351/speed-test/wp-351-genesis.png2. Same site as 1 with Simple Lightbox added
http://limecanvas.net/test/wp351/speed-test/wp-351-genesis-simple-lightbox.png3. Out website before tweaking
http://limecanvas.net/test/wp351/speed-test/lime-canvas-before-tweaks.jpg4. Running P3 on our site
http://limecanvas.net/test/wp351/speed-test/plugin-performance-test-before.png
Simple Lightbox plugin takes up 36.4% of the resources5. Running P3 again after I removed GOTMLS plugin and optimised JetPack, WidgetKit and Simple Lightbox
http://limecanvas.net/test/wp351/speed-test/plugin-performance-test-after.png6. Removing Simple Lightbox plugin and running pindom again
http://limecanvas.net/test/wp351/speed-test/lime-canvas-after-tweaks.pngThat’s all without any server optimisation.
Hope that helps.
Wil.
Thanks for your response @mmaunder
I expect that may people running sites on shared hosting, like mine, will not be able to use your plugin as we have no control over the max_user_connections setting 🙁
Regards,
Wil.Forum: Fixing WordPress
In reply to: Cannot redeclare class Plugin_Upgrader – WP CoreOK – thanks @esmi
I’ll try the FTP method in my regular update window later on today and will let you know if it makes a difference.
Forum: Fixing WordPress
In reply to: Cannot redeclare class Plugin_Upgrader – WP CoreThanks @esmi
Would reinstalling 3.5.1 from the UI do the same or does that just overwrite existing files, leaving old files intact?
Forum: Fixing WordPress
In reply to: Cannot redeclare class Plugin_Upgrader – WP CoreHi @esmi
That’s the full error from the log file. The preceding and following log messages are from something else but here they are anyway.
[Mon Feb 04 23:05:21 2013] [error] [client 41.86.108.228] WordPress database error MySQL server has gone away for query SELECT option_value FROM limecan_options WHERE option_name = ‘disqus_cc_fix’ LIMIT 1 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/genesis/index.php’), genesis, get_footer, locate_template, load_template, require_once(‘/themes/<<REDACTED>>/footer.php’), wp_footer, do_action(‘wp_footer’), call_user_func_array, dsq_output_footer_comment_js, get_option
[Tue Feb 05 03:15:03 2013] [error] [client 79.170.46.1] PHP Fatal error: Cannot redeclare class Plugin_Upgrader in /home/sites/<<REDACTED>>.com/public_html/wp-admin/includes/class-wp-upgrader.php on line 632
[Tue Feb 05 08:18:39 2013] [error] [client 101.164.9.228] PHP Notice: Undefined variable: description in /home/sites/<<REDACTED>>.com/public_html/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/NextScripts_SNAP.php on line 796, referer: http://www.<<REDACTED>>.com/wp-admin/plugins.php
Forum: Plugins
In reply to: [WP eCommerce] Product Category Edit bug – Catalog View resets to DefaultFound the bug in /wp-ecommerce/wpsc.admin/includes/save-data.functions.php
Lines 335, 336 and 337 should have
selected( $display_type, 'default' );
instead of
checked( $display_type, 'default' );Can yo please update the WPEC core?
Forum: Plugins
In reply to: [WP eCommerce] Product Category Edit bug – Catalog View resets to DefaultShould the option not have selected=’selected’ as an attribute rather than checked=’checked’
Forum: Plugins
In reply to: [WP eCommerce] Product Category Edit bug – Catalog View resets to DefaultI looked into this further in firebug.
I get the following array data for the $categories array in /wp-ecommerce/wpsc.admin/includes/save-data.functions.php
Array ( [term_id] => 1505 [name] => Stillson & Pipe Wrenches [slug] => stillson-pipe-wrenches [term_group] => 0 [term_taxonomy_id] => 1513 [taxonomy] => wpsc_product_category [description] => [parent] => 120 [count] => 2 [nice-name] => [image] => Stillson Wrenches.jpg [fee] => 0 [active] => 1 [order] => 0 [display_type] => grid [image_height] => [image_width] => [use_additional_form_set] => )The display_type is set to grid.
When I look in firebug, the following code is showing:
<select name='display_type'> <option value='default'>Default View</option> <option value='list'>List View</option> <option value='grid' checked='checked'>Grid View</option> </select>But the “Default View” is the selected item in the drop-down and that’s what it saves as each time.
Same behaviour in Chrome, FF and IE.
Any ideas?
@esmi – could you use your moderator powers to mark this thread as unresolved?
@esmi – why post a new topic when the Plugin Author wrongly resolved an unresolved thread?
Forum: Plugins
In reply to: [WP eCommerce] Thumbnail images are not scaling – they are being croppedIs anyone else having this issue with image cropping rather than resizing?
Forum: Plugins
In reply to: [WP eCommerce] Thumbnail images are not scaling – they are being croppedAny updates on this guys?