×
Infinite Scroll... (05 Mar 2019)

You may have noticed it, on the forum pages that have more then one page, the pagination links have 'gone'. Instead these pages now 'Infinite Scroll' via a new plugin I am working on. It will automaticalliy load new topics / posts when scrolling down... How cool is that :)
You can test it on this thread: onlinecommunityhub.nl/forum/jssocials

No bug twitter cards not showing large or any image

This ad is inserted here via ochCall2Action

Web Hosting

  • marckgoran
  • marckgoran's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 3 days ago #940 by marckgoran
Hi,

I just installed your plugin, which once I finally manage to make it work as intended is a great plugin In think. Not sure why it doesn't work at this time as it's fairly straight forward to setup. I have twitter whitelisted as suggested for robots.txt

Maybe you can try but I can't correctly generate the preview either via validator, not by actually publishing a link to test it: for example marckgoran.com/wall-handstand-standard


I am attaching the images from validator and meta-tags shown in the head of that link, the image link is correctly shown in meta but not shown.


Also I tried to test if a falback image would get shown on validator, and that works without any issues. Any suggestions?
Attachments:
The topic has been locked.
More
2 weeks 3 days ago #941 by ruud
Hi Marck,

thanks for reaching out on this issue.

I get the same results from the twitter validator then you get: image not showing.
However: when i try this page: marckgoran.com/butt-burn-1 it works with image.

The only thing i can see that that the url for the image in the og:image and twitter:image is not correct (it has a double // in front of the image instead of a single /)

When looking at the sharing debugger of facebook, it gives me this warning on the url:

Provided og:image, marckgoran.com//images/blog/270319bela_roj1500.jpg could not be downloaded. This can happen due to several different reasons such as your server using unsupported content-encoding. The crawler accepts deflate and gzip content encodings.


The twitter validator is not very verbose when it comes to why things are not as they should be, so maybe this will give a clue?

Question I have is why the URL to the image is not correct while on other pages it is correct?
Do you by any chance have the 'RewriteBase /' enabled in your sites .htaccess?
The topic has been locked.
  • marckgoran
  • marckgoran's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 3 days ago - 2 weeks 3 days ago #942 by marckgoran
Replied by marckgoran on topic twitter cards not showing large or any image
Thanks for such a fast reply

the link that you tried: marckgoran.com/butt-burn-1

it's an article, but because you are not subscribed content is not shown, what is shown is actually content of a subscription module, which shows a subscription description …but the whole thing at this time is not for public registration

if you will for example go in this blog category, here all posts are public
marckgoran.com/blog

all post within blog category are via native joomla articles, and all images are full article images (except when there is a gallery), so any link from that category is basically what I intended to use either for Twitter of Facebook linking

you pointed out interesting issue but this is the first time ever that I encounter a wrong url for an image, so far only your in the meta tags that are created for og tags for Facebook and Twitter, would this be possible to be a "simple" bug in the plugin then?

I missed that additional / in the image link when I was looking at the code, also yes that's exactly what I have enabled, 'RewriteBase /' enabled in .htaccess

but I never had an issue with this before, this would be the first time, not really sure this would be the cause, it's easy to test of course but 'RewriteBase /' is kinda pretty default setting is it not? also I am on latest stable joomla version 3.9.4

any suggestions what else to try but to comment 'RewriteBase /' in htaccess, and if this doesn't work?
Last edit: 2 weeks 3 days ago by marckgoran.
The topic has been locked.
More
2 weeks 3 days ago #943 by ruud

marckgoran wrote: you pointed out interesting issue, I missed that additional / in the image link, and yes that's exactly what I have enabled, 'RewriteBase /' enabled in .htaccess

but I never had an issue with this before, this would be the first time, not really sure this would be the cause, it's easy to test of course but 'RewriteBase /' is kinda pretty default setting is it not? also I am on latest stable joomla version 3.9.4

any suggestions what else to try but to comment 'RewriteBase /' in htaccess, and if this doesn't work?

Hi currently on mobile so a quick / short reply.
If you could test if commenting the rewritebase fixes the issue, then I can see if I can come up with a fix for that
The topic has been locked.
  • marckgoran
  • marckgoran's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 3 days ago #944 by marckgoran
Replied by marckgoran on topic twitter cards not showing large or any image
will try testing the .htaccess, rewriteBase / and let you know
The topic has been locked.
  • marckgoran
  • marckgoran's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 3 days ago - 2 weeks 3 days ago #945 by marckgoran
Replied by marckgoran on topic twitter cards not showing large or any image
okey so I tried on live version, to change the .htaccess

but then I tried also on my local machine, where I have a exact server copy, and I disabled URL rewriting completely via joomla config settings, but I still get that double // link when I check the meta tags via code inspector
Last edit: 2 weeks 3 days ago by marckgoran.
The topic has been locked.
More
2 weeks 3 days ago #946 by ruud
Thanks for testing and reporting back.
Is the image a intro image, full text image or an image in the article text?

I will try to reproduce tomorrow to see why this is happening
The topic has been locked.
  • marckgoran
  • marckgoran's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 3 days ago #947 by marckgoran
Replied by marckgoran on topic twitter cards not showing large or any image
no image is intro, almost all are full text, except where there is a small gallery, then it's inserted via yootheme widgetkit in the article
    /**
     * Converts relative image to absolute image
     *
     * @param   string  $image The image to check and make absolute if relative
     *
     * @return string Absolute Image
     */
    protected function absoluteImageUri($image)
    {
        str_replace(Uri::root(), '', $image);

        // Images that have no URL scheme will not pass image size validation
        if (stripos($image, '//') === 0) {
            $parsed_url = parse_url(Uri::root());
            $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . ':' : '';
            $image = $scheme . $image;
        }

        if (stripos($image, 'http') !== 0) {
            $image = Uri::root() . $image;
        }

        return $image;

took the liberty to just check a code a bit, maybe it has to do with this part from getcode.php, but you will know better then me anyway :)

I really appreciate your support and check the issue in piece when you can, is not critical time wise but of course I will be happy to have this solved
The topic has been locked.
More
2 weeks 2 days ago #948 by ruud
Hi,
I have tried multiple scenario's and configurations but i am not able to reproduce this on my sites.

The full (and intro) images are always stored without a starting /, so always as 'images/image.png' and not '/image/image.png'

The Uri::root() method returns the part to make the image absolute: in your case that would be ' https://marckgoran.com/ '

now the (simplified) routine here is to make the images relative (as facebook et al cannot handle absolute images) by concatenating the Uri::root() with the image: ' https://marckgoran.com/image/image.png '

nothing more, nothing less...

So just for debugging purposes, can you
1. browse on the front-end to the article with the // image
2. add the following code (will break your site!) in file ./plugins/content/ochopengraph/helpers/getimages.php on line 120 (the empty line BEFORE comment '// Read Image from Custom Article Field':
var_dump($images, $this->fullimage, Uri::root());die;

3. F5 on the front-end

this will display the images as saved by Joomla in the article ($images), the full image processed by the ochOpenGraph plugin ($this->fullimage) and your servers root URI)

can you then paste the results here?
The topic has been locked.
  • marckgoran
  • marckgoran's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 2 days ago - 2 weeks 2 days ago #949 by marckgoran
Replied by marckgoran on topic twitter cards not showing large or any image
Sure, just tried it locally, just to make sure, here is the code used from 117-120
var_dump($images, $this->fullimage, Uri::root());die;
// Read Image from Custom Article Field
$this->customFieldImage = OchOpengraphHelper::getCustomFieldValue($article, $ochopengraph_customimagefield);

here is what I get if I refresh the page
object(stdClass)#6355 (8) { ["image_intro"]=> string(0) "" ["float_intro"]=> string(0) "" ["image_intro_alt"]=> string(0) "" ["image_intro_caption"]=> string(0) "" ["image_fulltext"]=> string(35) "/images/blog/270319bela_roj1500.jpg" ["float_fulltext"]=> string(0) "" ["image_fulltext_alt"]=> string(0) "" ["image_fulltext_caption"]=> string(0) "" } NULL string(24) "http://2.marckgoran.com/"
Last edit: 2 weeks 2 days ago by marckgoran.
The topic has been locked.

End of content

No more pages to load

Log In or Sign Up

Forgot your password? / Forgot your username?