wildmice
Forum Replies Created
-
Forum: Plugins
In reply to: [Picturefill.WP] Very nice plugin!Hi Kyle – I found the problem. The picturefill.js script is not being enqueued.
It was working because i was already loading the script. When i tracked this down i discovered that it was being registered but not enqueued, so i just added the enqueue and it works.
Here is the change i made to class-picturefill-wp.php after line 56 –
// Filter and action methods
public function register_picturefill_scripts(){
wp_register_script(‘picturefill’, PICTUREFILL_WP_URL . ‘js/libs/picturefill.min.js’, array(), PICTUREFILL_WP_VERSION, true);
wp_enqueue_script(‘picturefill’);
}Forum: Plugins
In reply to: [Picturefill.WP] Very nice plugin!Thanks for a quick followup!
Since posting that i decided to use your version of picturefill.js to get width and height on the output – to satisfy Google Page Speed Insights, etc.
I also renamed the handle in my own source from ‘picturefill’ to picturefill-js’ and that made it work, but it strikes me that you should perhaps not duplicate the name that would logically be used for this.
The breakpoint is a small issue and i will look at your hook.
Now, the floated image problem. Here is the output that was generated from the HTML that i posted above.
<div><span data-picture data-alt=”Shanna” data-class=”alignleft size-full wp-image-126″>
<span data-src=”https://wildmice.ca/wp-content/uploads/2014/01/shanna-2010-06.jpg”></span>
<span data-src=”https://wildmice.ca/wp-content/uploads/2014/01/shanna-2010-06-150×150.jpg” data-width=”150″ data-height=”150″ data-media=”(min-width: 1px)” class=”picturefill-wp-source thumbnail”></span>
<span data-src=”https://wildmice.ca/wp-content/uploads/2014/01/shanna-2010-06.jpg” data-width=”150″ data-height=”150″ data-media=”(min-width: 1px) and (-webkit-min-device-pixel-ratio: 1.5),(min-resolution: 144dpi),(min-resolution: 1.5dppx)” class=”picturefill-wp-source retina thumbnail”></span>
<span data-src=”https://wildmice.ca/wp-content/uploads/2014/01/shanna-2010-06.jpg” data-width=”240″ data-height=”300″ data-media=”(min-width: 260px)” class=”picturefill-wp-source full”></span>
<noscript><img alt=”Shanna” class=”alignleft size-full wp-image-126″ height=”300″ src=”https://wildmice.ca/wp-content/uploads/2014/01/shanna-2010-06.jpg” width=”240″ /></noscript>
</span>However, you probably won’t need this, because after i replaced the original picturefill.js with your version it seems to be working. This seems a bit odd, since they are still different files and both being loaded, but the important point is that i seem to have stumbled into a solution.
The page concerned is this one – https://wildmice.ca/en/about/shanna/
Thanks for your response. If i discover that it’s really not working i will follow up, but it looks like using the same version of the script fixed it. I also made the spans for Scott’s version conform to yours, and maybe this was part of why it began working. I don’t know, but can do some tests for you if it matters.
— shanna
Forum: Plugins
In reply to: [Picturefill.WP] Very nice plugin!Further notes on this. It looks like the enqueueing of scripts is using ‘picturefill’ as a handle. This was causing a conflict. Maybe this plugin should be using ‘picturefill-wp’ ?
I have also discovered that it does not preserve the float on a left-aligned image. This has caused me to turn off the plugin. It would be nice to see this fixed.
Here is an example from the editor of an image that is left floated but losing its float with this plugin enabled –
<div><img alt=”Shanna” class=”alignleft size-full wp-image-126″ height=”300″ src=”https://wildmice.ca/wp-content/uploads/2014/01/shanna-2010-06.jpg” width=”240″ /></div>
Forum: Plugins
In reply to: [WP Native Dashboard] Frontend Admin Bar DisappearedI am having this problem too and posted about it on this forum a couple days ago. There are 2 situations under which i find the front end admin bar disappears when you check the translate option –
1. If you have an active session
2. If the site is passworded at a server level
Both of these are caused because the plugin suppresses the normal admin bar and then tries to fetch one itself after changing the locale and doing some stuff with cookies.
The first is easy to fix. Searching for the second is what found me this thread.
Forum: Plugins
In reply to: [WP Native Dashboard] translate front end admin bar option does not workOk, this took some digging. Here is the problem.
My theme uses session data, and your plugin fails to fetch the admin bar if there is an active session. This is happening in the function on_request_suppressed_admin_bar_translated().
If i save the session data at the top of that function and destroy the session, then recreate the session and put back the session data at the end of the function, everything works fine.
While it does work with this hack, this is such a great plugin and so nicely written that i’d really like to stay updated – so prefer to avoid hacking it.
Forum: Plugins
In reply to: [WP Native Dashboard] translate front end admin bar option does not workWait a minute. It works in Twentyfourteen so this is probably a theme problem. Don’t do anything just yet ??
Hi admintiger ~
Yeh, i know that. It works just fine with Apache on Windows. The problem is a combinatino of IIS (backslashes) and the network file path (double backslash at start).
The “compelling reason” for using IIS is that all of our clients use shared hosting, and some of them are on this IIS cloud hosting. So every time we update the plugin on every site we have to fix this again.
It’s not a show stopper, but would be nice to have. I would think that it ought to be a simple matter to escape backslashes in this file – if only to appease IIS users.
Here’s the code – it’s on IIS with a network file path (double backslash at the start) – this is the edited version that works – all i did was escape every backslash with another backslash.
<?php
# WP SUPER CACHE 0.8.9.1
function wpcache_broken_message() {
if ( false == strpos( $_SERVER[ ‘REQUEST_URI’ ], ‘wp-admin’ ) )
echo “<!– WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! –>”;
}if ( !include_once( ‘\\\\CLUSTER12\\ARRAY3\\J45V2B\\wwwroot\\wp-content\\plugins\\wp-super-cache/’ . ‘wp-cache-phase1.php’ ) ) {
if ( !@is_file( ‘\\\\CLUSTER12\\ARRAY3\\J45V2B\\wwwroot\\wp-content\\plugins\\wp-super-cache/’ . ‘wp-cache-phase1.php’ ) ) {
define( ‘ADVANCEDCACHEPROBLEM’, 1 );
register_shutdown_function( ‘wpcache_broken_message’ );
}
}
?>