Black Friday 2026 50% off every plan Our biggest deal of the year on #1 Joomla products.
Ends in 12d 14h 28m 39s
Claim 50% off
Solved Templates

No OG:image in MAGNIN-Template

Asked by RaBauKi 4 years ago Last activity 4 years ago

Hi,
I have the following problem: The OG:Image field (and other OG fields) are not generated in the article view (Blog) with the Magnin template.

I am using Joomla 4.0.5 under php 7.4 with the Magnin 1.0.0 template and Pagebuilder 3.8.3 Pro.

To comprehend: Install Magnin Quickstart Jomla 4.0. Activate Open Graph in the template options under BLOG. Insert a featured image in a new Joomla article under Blog Options. Then call up the blog view and then this article there: There is no OG:image field in the article (nor any other Open Graph fields either).

Help is desired, otherwise you can't share posts on facebook in an appealing way.

Accepted answer

Marked as the solution
Toufiq Senior Staff

Hi there,

Thanks for contacting us. Sorry for the inconvenience. Will you please provide me the Joomla administrator access to check the issue? I will check & get back to you soon. 

Or follow this process

Go to the file location

templates/magnin/html/com_content/article/default.php

And add this code line on after 62

<?php if($article_format == 'gallery') : ?>
        <?php echo LayoutHelper::render('joomla.content.blog.gallery', array('attribs' => $attribs, 'id'=>$this->item->id)); ?>
    <?php elseif($article_format == 'video') : ?>
        <?php echo LayoutHelper::render('joomla.content.blog.video', array('attribs' => $attribs)); ?>
    <?php elseif($article_format == 'audio') : ?>
        <?php echo LayoutHelper::render('joomla.content.blog.audio', array('attribs' => $attribs)); ?>
    <?php else: ?>
        <?php echo LayoutHelper::render('joomla.content.full_image', $this->item); ?>
    <?php endif; ?>

Add this css code inside the custom.css file.

.article-full-image {
    display: none;
}

-Thanks

6 more replies

RaBauKi Asked this

Thanks, it works now.
Added the change via an override and the OG:tags are now displayed.

RaBauKi Asked this

Dear support team,

this option works, but 2 different images are loaded each time a page is called up. Since the images are very large, there is a large unnecessary data transfer (because one of the images is not used and displayed).

  1. Is there a better, more data-efficient option?
  2. Was the error also reported to the developers and will a corresponding error solution be integrated into an update of the Magnin template?

Best regards

Toufiq Senior Staff

Can you share a screencast video about the full scenario? It would be helpful to understand the issue. Thanks

RaBauKi Asked this
  1. Please call up the page from the hidden area, here using the current Firefox as an example

  2. Call network analysis (Ctrl-Shift-E) and reload the page.

  3. The image "/images/2022/01/16/rabauki-062_large.jpg" and "/images/2022/01/16/rabauki-062_large.jpg" are loaded. One is the cropped version from the template blog settings, the other is pasted by the code above.

  4. Check the Codeinspector (Ctrl-Shift-C) classes: "article-full-image" and "article-details-top-wrapper".

  5. Both images are almost identical, only one should be loaded. nevertheless, an OG:image field should be output.

Best regards

Log in to reply.