Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #17302

    Hi,

    We use WPML at our website. When entering the website through http://www.botonhome.es WPML shows the Spanish version (default) of our website and when entering through http://www.thehomebutton.com it shows the English version of it.

    As you can see, when you enter through http://www.thehomebutton.com, the images of the portfolio will never load. Do you know what could be wrong? The path to the images are yet the same (and they show) as you can check in the code.

    Thanks.

    #94904

    Firebug gives me following error:

    SecurityError: The operation is insecure.

    var imgPixels = ctx.getImageData(0, 0, canvas.width, canvas.height);

    - please try to update Angular to version 1.4. Hopefully this will get rid if the security error too because Kriesi changed the way how the greyscale/canvas thumbnails are generated (instead of js/jquery he now uses php). You can download the latest version from http://themeforest.net

    #94905

    Hi,

    Thanks for your reply. I updated Angular to version 1.4 but it didn’t work. I had to compare every file with FileMerge to make sure I wasn’t modifying anything I added to the template. I made sure I didn’t forgot any file, but, just in case, could you tell me which files are the one that were modified to change the way the greyscale/canvas thumbnails are generated?

    Can you think of another possible fix?

    Thanks.

    #94906

    I’ll mark this thread for Kriesi because I’m not sure if we can fix the issue. If not the only solution I can think of is to redirect http://www.thehomebutton.com/ to eg http://www.thehomebutton.es?lang=en because the file paths/urls would load all resources from the same domain.

    #94907

    The problem is that we cannot use the same domain for the English and the Spanish websites, because, as you can see, we have http://www.botonhome.es and http://www.thehomebutton.com (we translated the name as well). I hope Kriesi can take a look at the problem.

    #94908

    Hi enriquebp.

    Maybe you can find something useful to get portfolio work from different domaind with WPML from this thread:

    http://www.kriesi.at/support/topic/wpml-ajax-porfolio-item-opening-issue-and-widget-title

    I fixed that with Choices theme: http://www.nuforms.com

    I think Angular has similar framework and could be fixed too.

    Thanks,

    Aleksandr

    #94909

    Thanks for the additional input Aleksandr :)

    Hopefully this helps enriquebp.

    Regards,

    Devin

    #94910

    Hey!

    Unfortunately thats a complicated issue. the theme uses javascript canvas function to generate the greyscaled version of the images (other than our follow up themes which uses a php script)

    Canvas images can not be created from images that are located on different domains so the only ad hoc solution I can think of is to turn of the greyscaling function in your portfolios.

    If you are good with javascript, it seems there is a jquery library that enables you to do cross-domain canvas operations, so you might also give this a try: http://www.maxnov.com/getimagedata/

    last but not least I would also recommend to contact the WPML team about this, they probably got a smart solution concerning domain redirects, htaccess magic or something like that to pull it off without changing the javascript…

    Regards

    Kriesi

    #94911

    Hi,

    Thanks for the reply.

    I have one idea but I’m not sure it’ll work.

    The problem is this javascript script doesn’t work with pictures located on different domains. However, both of our domain has the same content. I’ll explain: If we uploaded an image to the folder wp-content, this image could be accessed from both http://www.botonhome.es/wp-content/example.jpg and http://www.thehomebutton.com/wp-content/example.jpg

    So I am thinking, if the file is also located in both domains (as the image), is there a way for the javascript file to both work and link the images from the domain that the user is in?

    (I am sorry about my English, I might not have explained my idea very clear)

    #94913

    Hm, you might want to ask the WPML support team if this is easily possible, maybe with the help of a domain filter function…

    We have something similar for our other themes, maybe it also works in this case. You can give it a shot by adding this scripts to the end of your functions.php file:

    http://pastie.org/5173080

    Before doing that please update to the latest theem version, which should be available within the next 24 hours

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

The topic ‘Portfolio wont load when entering the website from our alternate domain (WPML)’ is closed to new replies.