Announcement

Collapse
No announcement yet.

Social Images Have Wrong URL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Social Images Have Wrong URL

    Hi All:

    I noticed that the links for the "social images" that are automatically generated for twitter and pinterest have the wrong URL. They have an added ../ in the URL, such as in the middle of this URL:
    Code:
    http://www.thebuddhagarden.com/mm5/../images/incense/japanese/morningstar/morning-star-incense.jpg
    When I do a view source, The base href for my site is:

    Code:
    <base href="http://www.thebuddhagarden.com/mm5/" />
    Any thoughts?
    Last edited by Siamese-Dream.Com; 07-22-15, 02:33 PM.
    Mark Romero
    ~~~~~~~~

    #2
    Re: Social Images Have Wrong URL

    Sumome.com
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Re: Social Images Have Wrong URL

      ???
      Mark Romero
      ~~~~~~~~

      Comment


        #4
        Re: Social Images Have Wrong URL

        go there, sign up, use their tool...go on to next project.
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment


          #5
          Re: Social Images Have Wrong URL

          Hi again, Bruce:

          I am really confused here.

          All I want to do is figure out why the URLs generated by MIVA have an extra ../ in them.

          Precisely, why is this miva template code:

          <meta itemprop="image" content="&mvt:global:socialImage;" />

          creating an extra ../ in the url it generates???

          I didn't see anything on the SumoMe web site about fixing Miva template code :(

          Does it have anything to do with my base href tag, which is:

          Code:
          <base href="http://www.thebuddhagarden.com/mm5/" />
          ???

          Thanks in advance.
          Mark Romero
          ~~~~~~~~

          Comment


            #6
            Re: Social Images Have Wrong URL

            Hello Mark,

            No it has nothing to do with your base href tag. By the way I see it is fixed in your site, what exactly was the problem?
            Rajnish Sinha
            ---------------------
            https://twitter.com/rajnishsi

            Comment


              #7
              Re: Social Images Have Wrong URL

              @ rajnishi:

              Thanks for the note.

              Unfortunately, it is not fixed. Take a look at this page:

              http://www.thebuddhagarden.com/morni...r-incense.html

              If you see the source code for the pinterest button, there is an extra ../ in the middle of the url that the pinterest button generates.

              I think it is because my images are not in the mm5 directory (or subdirectory) but are in a folder called /images/ which is in the https level directory.

              So the path to most of my images starts with ../images/subfolder_name/image_name.jpg

              While miva is expecting the path to be something like:

              graphics/00000001/image_name.jpg

              I think that is why it is getting messed up?!?!?!
              Mark Romero
              ~~~~~~~~

              Comment


                #8
                Re: Social Images Have Wrong URL

                Originally posted by Siamese-Dream.Com View Post
                @ rajnishi:

                Thanks for the note.

                Unfortunately, it is not fixed. Take a look at this page:

                http://www.thebuddhagarden.com/morni...r-incense.html

                If you see the source code for the pinterest button, there is an extra ../ in the middle of the url that the pinterest button generates.

                I think it is because my images are not in the mm5 directory (or subdirectory) but are in a folder called /images/ which is in the https level directory.

                So the path to most of my images starts with ../images/subfolder_name/image_name.jpg

                While miva is expecting the path to be something like:

                graphics/00000001/image_name.jpg

                I think that is why it is getting messed up?!?!?!
                Looks like this is custom code you're adding and it's hard to tell since theres also reference to siamese-dream in the url. It's pinning the product image for me without a problem.

                Code:
                <a class="PIN_1437774908921_pin_it_button_20 PIN_1437774908921_pin_it_button_en_20_gray PIN_1437774908921_pin_it_button_inline_20 PIN_1437774908921_pin_it_beside_20 PIN_1437774908921_hazClick" data-pin-href="//www.pinterest.com/pin/create/button/?guid=07M3181zYgih-1&amp;url=http%3A%2F%2Fwww.siamese-dream.com/morning-star-incense.html&amp;media=http%3A%2F%2Fwww.thebuddhagarden.com%2Fmm5%2F..%2Fimages%2Fincense%2Fjapanese%2Fmorningstar%2Fmorning-star-incense.jpg&amp;description=Morning%20Star%20Incense%20-%20200%20Sticks%20Per%20Box%20-%20Price%20$7.99%20-%20FROM%20Siamese-Dream.Com" data-pin-log="button_pinit" data-pin-config="beside"><span class="PIN_1437774908921_hidden" id="PIN_1437774908921_pin_count_0"><i></i></span></a>
                Last edited by Mark Hood; 07-24-15, 01:58 PM.
                Mark Hood
                Vermont Gear

                Comment


                  #9
                  Re: Social Images Have Wrong URL

                  Thanks, Mark. I will look through the code again. Been a long week...

                  But do you have any idea how I would modify the

                  Code:
                  <meta itemprop="image" content="&mvt:global:socialImage;" />
                  So that I can avoid the problem?
                  Mark Romero
                  ~~~~~~~~

                  Comment


                    #10
                    Re: Social Images Have Wrong URL

                    It's in the global head tag content.
                    <mvt:assign name="g.socialImage" value="'http://' $ g.domain:name $ '/mm5/' $ l.settings:product:customfield_values:productimage customfields:main" />

                    Like I said though your product image seems to pin just fine. The link on the other hand might be an issue.
                    Mark Hood
                    Vermont Gear

                    Comment


                      #11
                      Re: Social Images Have Wrong URL

                      Thank you again, Mark.

                      BTW: Your help is needed (by someone else - not me this time) in this thread:

                      http://extranet.miva.com/forums/show...-Documentation
                      Mark Romero
                      ~~~~~~~~

                      Comment


                        #12
                        Re: Social Images Have Wrong URL

                        Originally posted by Siamese-Dream.Com View Post
                        @ rajnishi:

                        Thanks for the note.

                        Unfortunately, it is not fixed. Take a look at this page:

                        http://www.thebuddhagarden.com/morni...r-incense.html

                        If you see the source code for the pinterest button, there is an extra ../ in the middle of the url that the pinterest button generates.

                        I think it is because my images are not in the mm5 directory (or subdirectory) but are in a folder called /images/ which is in the https level directory.

                        So the path to most of my images starts with ../images/subfolder_name/image_name.jpg

                        While miva is expecting the path to be something like:

                        graphics/00000001/image_name.jpg

                        I think that is why it is getting messed up?!?!?!
                        Hi Mark,

                        There is nothing wrong with the '../' too in this context. When browsers view URLs with this structure, http://www.example.com/folder/../subfolder/image.jpg they interpret it as http://www.example.com/subfolder/image.jpg.
                        '../' symbol tells them to look the following resource by moving up a directory. As you mentioned, that your images are outside of mm5 folder, Miva is simply appending the '../' character to the URL to comply with your folder structure in accordance with the base URL.
                        Rajnish Sinha
                        ---------------------
                        https://twitter.com/rajnishsi

                        Comment


                          #13
                          Re: Social Images Have Wrong URL

                          <mvt:soapbox>

                          Annnndddd...my point of suggesting Sumome.com is that, you'd have all social media links in a pretty nice (and commonly scene) mobile friendly widget in about 5 minutes start to finish instead of 5 days.

                          Whenever possible (and the service isn't trying to steal valuable data) use a service for these things...its the way the web is going and it doesn't really make sense most of the time to code these yourselves.

                          The best part is that, should Facebook, Pinterst etc, add or change a feature, the existing widget would probably change automatically for you.

                          </mvt:soapbox>
                          Bruce Golub
                          Phosphor Media - "Your Success is our Business"

                          Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
                          phosphormedia.com

                          Comment

                          Working...
                          X