Multisite image issue

This topic contains 10 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 7 years, 10 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #9198
    pframe
    pframe
    Participant

    I am trying to use Ajax Search Pro on a specific site on my wp multisite (specifically the isometric layout).
    I am running into an issue with all the images not showing up. I looked at the knowledge base, found 3 articles about this, but none of the suggestions appear to have helped.

    On inspection, I notice that the images it is trying to display have partially incorrect urls:
    background-image: url(“http://mymultisite.com//files/2016/03/myimage.jpg “);

    notice the //files… it SHOULD be linking to
    http://mymultisite.com/mysite-com/files/2016/03/myimage.jpg

    Any idea why this is happening? Doesn’t seem to be detecting the proper image url path for my multisite.
    Gave you credentials, you can add the shortcode to the homepage but.. I don’t want to save it to live.. just testing it on a preview and trying to get it to work currently.

    #9220
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    The double slashes within the image URL may indicate that somethin is missing when parsing them, but I’m not sure.

    I’ve logged in with the credentials, but I believe it does not have administrator rights, as I cannot see the ajax search pro option, nor some other ones. Can you please fix that? Can you please also provide temporary FTP access as well? I highly doubt this is a configuration issue, and it’s unfortunately working correctly on my multisite test environment.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #9226
    pframe
    pframe
    Participant

    Okay so, figured out the cause.
    Our multisite uses a domain mapper plugin. It creates a mapping between mysite.com and mymultisite.com/mysite-com. Which apparently your plugin doesn’t pick up on.
    So basically.. all the images on the site link to things like mysite.com/files/2016/03/myimage.jpg, but the multisite version also works.
    So, unless you have some code I can put into functions.php to help it along, our only options would be to either find a different plugin, or to pull the site out of our multisite entirely and put it in its own wordpress.
    We have many many sites in this multisite and don’t have individual site FTP set up currently, so I don’t feel comfortable giving you FTP access.

    #9227
    pframe
    pframe
    Participant

    Oh, I did upgrade the user to admin though.

    #9233
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    It’s probably that, altough I’m pretty sure it should return the correct picture, as it’s parsed with an internal wordpress call.

    I gladly put together a snippet to fix that, but I need to know how the mapping is done. From what I can see, this might be the solution to put in the functions.php file:

    This should recognize the double slash pattern and try to replace that with the correct home url. Let’s hope it will work.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #9262
    pframe
    pframe
    Participant

    Hey that worked! 🙂
    Thanks this is very helpful!

    #9265
    pframe
    pframe
    Participant

    Oh hmm… now the styling (theme options) are not applying to it on live. The preview works (because it uses the multisite address), but the live site has default styling

    #9266
    pframe
    pframe
    Participant

    I mean.. I could probably just do normal css for it but.. wanted to see if you had any ideas.

    #9276
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    You are welcome!

    The CSS issue: it appears that it’s a cache related problem, probably CDN cache. If you look at the search stylesheet file currently loaded:

    https://mormonmusic.org/files/asp_upload/style.instances.css?ver=4.9.1

    and compare it to the same file with different query parameter, for example:

    https://mormonmusic.org/files/asp_upload/style.instances.css?x=2

    They are different, and the second one is the newer. It means that it’s either cached by a plugin, or on CDN if you use any (cloudflare, maxCDN etc..) The file is changed correctly, but since the cache is not cleared, the server pushes the old one.

    If you clear the site cache and CDN cache (and browser cache as well), the problem should go away.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #9284
    pframe
    pframe
    Participant

    Oh wow.. I feel dumb now haha.
    I should have realized that.
    Okay awesome. You can close the ticket!
    And we will probably be buying another licence for another of our sites!
    Have a great day!

    #9285
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I’m happy I was able to help you, thank you for your kind words 🙂

    I will close this ticket now as per requested. You can open another one, if you find other issues.

    If you like the plugin, feel free to rate it on your codecanyon downloads page, it’s greatly appreciated.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘Multisite image issue’ is closed to new replies.