Related Items Extended error After installation

  • Posted by TemplatePlazza (5261) Offline
Well I just found out, that it's not adding the readmore that will fix it, but simply re-saving the article will fix it. I just re-saved this article (without adding a new 'read more') : adapokrites.gr/adapokrites/perivallon/ww...is-gia-tin-agria-zoi and then error on this page is gone :

But there is still a problem in other articles.
For example
adapokrites.gr/adapokrites/diethneis-eid...ki-ekklisia-sti-lyon

3 years 9 months ago #19 by TemplatePlazza

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5261) Offline
I have made some changes to the module helper. Can you check again whether the issue still exist or not?

I have checked all of these articles and all of them are working properly :

But there is still a problem in other articles.
For example
adapokrites.gr/adapokrites/diethneis-eid...ki-ekklisia-sti-lyon

adapokrites.gr/adapokrites/diethneis-eid...asma-tou-tyfona-goni

adapokrites.gr/adapokrites/diethneis-eid...kataggellei-i-unicef

adapokrites.gr/adapokrites/diethneis-eid...diadiloton-varkeloni

and many more...

3 years 9 months ago #20 by TemplatePlazza

Please Log in or Create an account to join the conversation.

  • Posted by DIMITRIS KAMARETSOS (15) Offline
From what I understood if I edit the article the mistake goes away. Correctly;

There are still mistakes. What is happening is inexplicable. I understand!
adapokrites.gr/adapokrites/diethneis-eid...po-io-dytikoy-neilou

Anyway, thank you for all the effort and help you offered me!!!

I would like to ask you if the thumbnails created by the extension are deleted and after how long?
3 years 9 months ago #21 by DIMITRIS KAMARETSOS

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5261) Offline

There are still mistakes. What is happening is inexplicable. I understand!
adapokrites.gr/adapokrites/diethneis-eid...po-io-dytikoy-neilou

Ahh .. I even already added a handler to handle non-existent(missing) images, but I don't know why this still happening. What makes it strange is that this can be fixed by re-saving the specific related article.

Anyway how did the 5,000 lost photos are inserted to the article? Is it inserted to intro image and fulltext image?

I would like to ask you if the thumbnails created by the extension are deleted and after how long?

The thumbnail images are never deleted for performance reason. The module generates the thumbnail only once, then later the module will call the existing thumbnail file directly without trying to re-generate the thumbnail, because generating thumbnail can take a significant server resource consumption (depends on the server ram and cpu), especially when you have a big 4K photos in your article.
But those thumbnails can be manually deleted by deleting image files in the folder : ../images/thumbnails/mod_relateditems_xtd Once the thumbnails are deleted, the module will regenerate a new ones when the module is loaded in the frontpage.
3 years 9 months ago #22 by TemplatePlazza

Please Log in or Create an account to join the conversation.

  • Posted by DIMITRIS KAMARETSOS (15) Offline
The 5,000 missing photos of the articles have not included thumbnails and full text images. Unfortunately. We are trying to get new ones again, but it takes time.


I would also suggest that in an upcoming upgrade there is an option so that the extension can use the existing photos of the articles.

Of course, only websites with thousands of articles need this.
Imagine a website with 300,000 articles, how much space the thumbnails take up on the server.

For example
To save space on the server, we use a 700 x 400 photo that appears as a thumbnail and an article photo.

In this way our website with 30,000 articles occupies only 1 giga on the server

Correspondingly, I know websites that with half articles occupy more than 10 giga in the server

This is an issue that no cms ( joomla, wordpress) has taken seriously.



Thank you again for the help you offered me !!!!
3 years 9 months ago #23 by DIMITRIS KAMARETSOS

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5261) Offline

Of course, only websites with thousands of articles need this.
Imagine a website with 300,000 articles, how much space the thumbnails take up on the server.

I see, although the generated thumbnails are only about 5-40kb in size, I can understand that it will take a lot of storage when you have 300.000 articles.

I would also suggest that in an upcoming upgrade there is an option so that the extension can use the existing photos of the articles.

You can do that easily via template override actually. Basically you just need to comment this line (I'm assuming you're using carousel_xt) :
$thumb_img = ModRelatedItemsXtdHelper::getThumbnail($params, $item->id, $item->images, $item->title,$item->introtext,$module->id);
and change it with :
$images = json_decode($item->images);
                // Find Article's Image
                if (!empty($images->image_intro) ) { 
                    $thumb_image = $images->image_intro;
                } elseif (empty($images->image_intro) && !empty($images->image_fulltext) ) { 
                    $thumb_image = $images->image_fulltext;
                } else {
                    // Find first image in the article
                    $html = $item->introtext;
                    $pattern = '/src="([^"]+)"/';
 
                    if ( preg_match($pattern, $html, $match) ) {
                        $thumb_image = $match[1];
                    } else {
                        $thumb_image = "";
                    }
                }

and then change the code
<div class="mfp_overlay_bg" style="background:url(<?php echo $thumb_img[1]; ?> ) no-repeat;"></div>
with this one
<div class="mfp_overlay_bg" style="background: url(/<?php echo $thumb_image; ?> ) no-repeat;"></div>
3 years 9 months ago #24 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum