1. globaltech
  2. RO CSVI
  3. Friday, 17 November 2017
  4.  Subscribe via email
Hello to all.

We are having a Joomla 3.8.2 site and we are using K2 2.8.0 and we have the K2MultiImages plugin installed.

We are using CSVI Pro (7.3.0) to import K2 items through an xml file found here.
As you can see from the attached log files (10 first records) all items are being created but no photo is imported.
On log file #111 is the attempt we made with K2MultiImages plugin enabled and on #116 with the plugin disabled.

Any help or advise would be much appreciated.
Thank you in advance.
com_csvi.log.111.txt com_csvi.log.116.txt
Accepted Answer Pending Moderation
Hi tharuna.

We have deleted the contents of media/k2/items/src and we runned the import again. Still some images are not imported to items.
  1. more than a month ago
  2. RO CSVI
  3. # 21
Accepted Answer Pending Moderation
Hello,
Some images were imported with names prefixed with media_k2_items_src and that was the issue. I have fixed this in code on your site. Can you clean up old images and run the import again?
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 22
Accepted Answer Pending Moderation
We have deleted the contents of media/k2/items/src but still some items dont get the images. We have to delete the images in media/k2/items/cache too?

Thanks again for all your help
  1. more than a month ago
  2. RO CSVI
  3. # 23
Accepted Answer Pending Moderation
Hello,
Yes try cleaning up cache folder and run the import. From what i can see in media/k2/items/src folder images are imported good.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 24
Accepted Answer Pending Moderation
Hi tharuna.

We have run an import for 100 items after we have deleted the contents of media/k2/items/src and media/k2/items/cache. We have also deleted all the items before the import. Same issue again, some items come with photos some don't.

Thanks
  1. more than a month ago
  2. RO CSVI
  3. # 25
Accepted Answer Pending Moderation
Hello,
I did a test run of import on your site and see the missing images are imported good now. Can you check it again running the import?
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 26
Accepted Answer Pending Moderation
Hi again tharuna.

You told us that csvi doesn't coorporate with K2multiimages plugin. Does it coorporate with another module with the function to add multiimages in k2 item?

Thanks in advance
  1. more than a month ago
  2. RO CSVI
  3. # 27
Accepted Answer Pending Moderation
Hello,
No, CSVI does not support multiple images for any 3rd party extensions. One way is that you can do custom coding for the multiple images in CSVI K2 item import file and set it as a Override file for import.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 28
Accepted Answer Pending Moderation
Thank you for all your help so far.
We will give it a try with custom coding and reply with the results if any :)
  1. more than a month ago
  2. RO CSVI
  3. # 29
Accepted Answer Pending Moderation
Hello, I would like to share the solution we found on the beforementioned issue.

K2multiimages plugin tend to store photos with names md5_2 for the second photo, md5_3 for the third phot and so on.

Given the fact that the xml file we want to import has at top 25 images for every article, we followed tharuna’s advice and we created 25 override files of item.php for the import process. At each file on line 370 we replaced original code
$filename = md5('Image' . $this->item->id);

with
$filename = md5('Image' . $this->item->id).'_2';

for the second photo override
$filename = md5('Image' . $this->item->id).'_3';

for the third photo override and so on.

Then we created 25 templates, and we used on each one of them the according override file.
Finally, we run all 25 imports consequently and… success, all items are being created and updated with multiple photos.

I’m certain that we could have managed better if we had implemented a "foreach" command and do all the above with a single override file and template but our coding skills are not that elevated. :)

Sorry for the long post, but I wanted to share our workaround and even get any advices for improving it if any.

Thank you for all your help on this one.

Best regards.
  1. more than a month ago
  2. RO CSVI
  3. # 30
Accepted Answer Pending Moderation
Hello,
Given the fact that the xml file we want to import has at top 25 images for every article, we followed tharuna’s advice and we created 25 override files of item.php for the import process. At each file on line 370 we replaced original code

25 overrides :ohmy: I did not advise to create one override for each image. Would have been better if you have one override with custom code for importing all 25 images.

Then we created 25 templates, and we used on each one of them the according override file.
Finally, we run all 25 imports consequently and… success, all items are being created and updated with multiple photos.

If its one time import then handling 25 templates is OK but with regular imports it is really going to be difficult for handling these templates.

I’m certain that we could have managed better if we had implemented a "foreach" command and do all the above with a single override file and template but our coding skills are not that elevated. :)

Sorry for the long post, but I wanted to share our workaround and even get any advices for improving it if any.

Having a for loop for importing all 25 images using one override file would be the best way of handling this situation.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 31
Accepted Answer Pending Moderation
Hello.
25 overrides :ohmy: I did not advise to create one override for each image. Would have been better if you have one override with custom code for importing all 25 images.

Sorry if I explained that wrong. I never meant that Tharuna advised us to make 25 overrides. What I wanted to say is that you guided us towards using overrides.

As I said before the use of a foreach loop would be the best way to do it and we are planning on implementing soon.
  1. more than a month ago
  2. RO CSVI
  3. # 32
Accepted Answer Pending Moderation
No worries, Let us know how it goes after you implement one override for all the images:)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 33
  • Page :
  • 1
  • 2


There are no replies made for this post yet.
Be one of the first to reply to this post!