unfetchable URL Images 403 forbidden

Hi all,

    I am facing this problem for few months any URL images from profile image to blog_tools image anything that goes in to serve-file url i am getting a 403 forbidden error i don't know why i am getting this error.. bcz of this any blog image or profile, group image is not getting rendered in social network site.. 

  • stream wire they where not able to fetch when i tried to copy the image URL & fetched they gave me 404 error

    You can not copy image from Elgg site and paste it or use the image's link on another site because this is protection against hotlink.

     I have problem with group & blog tools alone

    But you can embed such images in the posts that you want to share on the silos.

    Example:

    My post on the Elgg site: https://pw.wzm.me/wall/p/8488 with attached image.

    Shared this post on Twitter: https://twitter.com/RiverVanRain/status/1175395665008037891

    As you can see the attached image was fetched very well.

  • I am using elgg from version 1.7 i had no problem with images even if facebook or twitter would need a meta tag but pinterest will simply fetch the image that's simply available in the page.. The elgg has done lot of improvement in recent days & we need to appreciate that but handling meta tag should be done basically in the core plugin would have give a push for the third party plugin to improve in that area would have played well for elgg in social network.. Well now lets say the issue is in my side i just want the steps at least to find what is the problem in my side as no user is able to share there content with image in social network .. As i said before i have deactivated all the third party plugin but still it did not fix my issue.. Elgg has to understand the end user as it's a CMS it needs to have an simple way to handle the image not confusing an end user who has no idea on PHP, Cache, cookie all those things or they need to find the user friendly way to fix the image problem.. The cms that came after elgg is able to do better in social network without the help of third party plugins to handle the meta tag as the core plugin is built with metatag (Though i Love elgg more than any CMS).. I also see elgg is not giving any interest in improving there core plugin they could have easily added an option to upload images in blog, pages without the third party plugin or at least incorporate the third party plugin within there core plugin in elgg 1.8 itself.. Elgg has improved it's core to handle complex scripts but forgot it's core plugin on it's way to improvement..             

  • This is no problem Elgg core. You should make the custom plugin to allow any silos fetch your content. We did it on all our sites.

    Elgg is awesome because not CMS but framework. It's mean that Elgg's priority for developers not users.

  • @RvR: i can see that .. So lets say this is my blog i am trying to fetch this in pinterest.. The image is public the elgg database has 755 permission .. I don't know what else i need to do .. 
    https://connectgalaxy.com/blog/view/183747/list-of-weird-things-that-can-happen-to-you-while-youre-asleep

    Leave twitter & facebook it might need metatag but i am sure pinterest just searches for images inside the blog once its able to see an image it just picks up.. but i only get an answer no image in pinterest ..  

  • Pinterest uses OpenGraph. So you don't need additional meta tags.

    Using this plugin you can add your own rules in header, e.g.:

    if (elgg_in_context('blog') && !empty($entity)) {
        $thumb = $entity->getIcon('large');
        $image = elgg_get_inline_url($thumb);
    }
    
    //then
    'og:image' => $image,
    Much depends on the context and file types. But you can test it.
     
    There's discussion.
     
    There's a validator also.
     
    Additional, we've added Schema.org tags on the sites.
  • Just shared some our website's link on Pinterest - works very well: all images are fetched.

  • @RvR I am not that good at PHP check the coding & i guess you can update it in open graph plugin to support blog tools .. Thanks for all your help ..

     

    <?php
    /**
     * Open Graph/Twitter Cards/Schema.org headers for Elgg.
     * Provides side wide and object specific headers for Elgg.
     *
     * @licence GNU Public License version 2
     * @link https://wzm.me
     * @author Marcus Povey <marcus@marcus-povey.co.uk>
     * @author RiverVanRain <hello@wzm.me>
    */
     
    $owner = elgg_get_page_owner_entity();
    $profile_url = elgg_get_site_url().'profile/'.$owner->username;
     
    //Description
    if ((elgg_in_context('profile') || elgg_in_context('group_profile')) && $owner->description) {
    $owner_description = urldecode(html_entity_decode(strip_tags(elgg_get_excerpt($owner->description, 250))));
        $owner_description = str_replace(array(
            "\r",
            "\n",
    "'",
    "\"",
        ), '', $owner_description);
        $meta_description = $owner_description;
    }
     
    //blog
    if (elgg_in_context('blog') && !empty($entity)) {
        $thumb = $entity->getIcon('large');
        $image = elgg_get_inline_url($thumb);
    }
     
    //then
     
    //blog end
     
    else {
        $meta_description = elgg_get_site_entity()->description;
    }
     
    $opendesc = strip_tags($meta_description);
     
    //OPENGRAPH
    if (!elgg_get_config('site_opengraph')){
    elgg_set_config('site_opengraph', []);
    }
     
    elgg_set_config('site_opengraph', 
    array_merge([
    'og:title' => $vars['title'],
    'og:type' => 'website',
    'og:url' => current_page_url(),
    'og:description' => $opendesc,
    'og:image' => $image,
    'og:site_name' => elgg_get_config('sitename'),
    ], elgg_get_config('site_opengraph')
    ));
     
    $headers = elgg_trigger_plugin_hook('header', 'opengraph', ['url' => current_page_url()], elgg_get_config('site_opengraph'));
        
    foreach ($headers as $property => $content) {
    ?>
    <meta property="<?=$property;?>" content="<?=$content;?>" />
    <?php
    }
     
    //TWITTERCARDS
    if (!elgg_get_config('site_twittercards')){
    elgg_set_config('site_twittercards', []);
    }
     
    elgg_set_config('site_twittercards', 
    array_merge([
    'twitter:title' => $vars['title'],
    'twitter:url' => current_page_url(),
    'twitter:description' => $opendesc,
    'twitter:card' => 'summary',
    ], elgg_get_config('site_twittercards')
    ));
     
    $headers = elgg_trigger_plugin_hook('header', 'twittercards', ['url' => current_page_url()], elgg_get_config('site_twittercards'));
     
     
    foreach ($headers as $name => $content) {
    ?>
    <meta name="<?=$name;?>" content="<?=$content;?>" />
    <?php
    }
     
    //SCHEMA
    if (!elgg_get_config('site_schema')){
    elgg_set_config('site_schema', []);
    }
     
    elgg_set_config('site_schema', array_merge([
        'name' => $vars['title'],
    'description' => $opendesc,
    ], elgg_get_config('site_schema')));
     
    $headers = elgg_trigger_plugin_hook('header', 'schema', ['url' => current_page_url()], elgg_get_config('site_schema'));
     
    foreach ($headers as $itemprop => $content) {
    ?>
    <meta itemprop="<?=$itemprop;?>" content="<?=$content;?>" />
    <?php
    }
     
    if (elgg_in_context('profile')) {
    ?>
    <link href="<?=$profile_url;?>" rel="publisher">
    <?php
    }
Performance and Scalability

Performance and Scalability

If you've got a need for speed, this group is for you.