• Resolved fzoc

    (@fzoc)


    Hi,

    First of all thank you for this great plugin that is working perfectly for me in Retina.js mode.

    However, I would like to use the recommended PictureFill mode, but unfortunately it does not work on my setup, which is:
    – WordPress 4.1.1
    – WordPress MU Domain Mapping plugin to map blogs to custom domains.

    To be short, the plugin is simply trying to search for retina images at the wrong path. For example (from the logfile):

    2015-03-07 15:26:24: * HTML REWRITE FOR PICTUREFILL
    2015-03-07 15:26:24: Retina file at '/Volumes/Data/Library/Server/Web/Data/Sites/wordpress/files/2015/01/Tilt-Shift-First-try-432x432@2x.jpg' does not exist.
    2015-03-07 15:26:24: The img tag was not rewritten. No retina for 'https://www.zoccolo.com/files/2015/01/Tilt-Shift-First-try-432x432.jpg'.

    The path for this file should be /Volumes/Data/Library/Server/Web/Data/Sites/wordpress/wp-content/blogs.dir/3/files/2015/01/Tilt-Shift-First-try-432×432\@2x.jpg

    I did not had a look to your code, but I suppose the problem is related to the domain mapping plugin and the fact that the server name in img src tags is from a custom domain and not a subdomain of my WP installation (and then it cannot map back URL to PATH).

    I’m not going to ask you to fix this problem because my setup is pretty uncommon, but if you could help me to find a solution by:
    1) Suggesting domain mapping plugin you know is working with wp-retina
    or
    2) Giving some advices on how I could patch the code myself, given the fact that I have more than 15 years experiences in OOP (mostly C++, but PHP should’nt be a problem), but know nothing about the WordPress API.

    Many thanks.

    https://wordpress.org/plugins/wp-retina-2x/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hello,

    The plugin supports multisite since a long time but I have never tested it with MU Domain Mapping. I am not surprised it doesn’t work 🙂 I never tried any of the domain mapping plugin. I much prefer having one install per domain (except if it is multilingual, but in that case the plugin supports WPML and Polylang).

    In the “wp-retina-2x.php” file, look for the “wr2x_get_pathinfo_from_image_src” function. This is the function that finds out the system filepath based on the image URL. This is where the problem is happening. From this $image_src you should try to resolve it to the correct filepath then I think everything will work.

    To debug your modification, I suggest you to log to your PHP error log using the error_log() function. You could log the $image_src and your output attempts. Shouldn’t be too hard 🙂

    Thread Starter fzoc

    (@fzoc)

    I’ll try to see what I can do, given your advices.

    Thank you Jordy.

    Same here with multisite install using MU Domain Mapping plugin. Looking forward to a fix soon.

    Plugin Author Jordy Meow

    (@tigroumeow)

    fzoc, did you look into this? It should be easy to figure out on your installs since you already have everything ready. I would definitely add the modifications into the plugin.

    Thread Starter fzoc

    (@fzoc)

    No, I’m sorry I didn’t had time to have a look at the problem.

    My full time job takes me most of my time and actually I do not know when I will have time to dig into this.

    Plugin Author Jordy Meow

    (@tigroumeow)

    Sure, I will try to find some time later… It’s just a lot of time for me as well especially it is not particularly on the top of my to do list for the plugin. Let’s see 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Not working for me (wordpress in multisite mode / domain mapping plugin)’ is closed to new replies.