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
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. # 1
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. # 2
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. # 3
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. # 4
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. # 5
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. # 6
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. # 7
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. # 8
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. # 9
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. # 10
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. # 11
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. # 12
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. # 13
Accepted Answer Pending Moderation
Hello,
You media/k2/items/src folder still has the old images with 0 filesize and i think with your latest import with image is formed with prefix media_k2_items_src as new image name. Debug log says image has been downloaded fine. So can you clean up your image folder completely 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. # 14
Accepted Answer Pending Moderation
Hi again tharuna.

I run the import again (after increase the disk space of the account cause it was full, so I think thats why we get the error cannot write on log file). So I run the K2_import and it doesnt bring the images for all items, although I can see in the xml that for example the item ID 1120 has image but it doesnt import. Any suggestions?

Thanks in advance
  1. more than a month ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
Hello,
This looks more like a permission issue. When i ran the import for 200 records i did not see this error. From the screenshot i can see that you have run 500 records and then see this error. Is there any usability limit you have in writing or accessing the folders? You need to check with your hosting on why you see this error.

Also check permission for all folders from System >> System Information >> Directory Permissions. Make sure all files and folders are writable. If they aren't, then you will need to change the permissions, so that all folders are set to 755 and files are set to 644.
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. # 16
Accepted Answer Pending Moderation
In the About page I can see all the folders are writtable.
imp2.jpg
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 17
Accepted Answer Pending Moderation
Hello,
It looks like the logs folder does not have correct permissions. You can go to CSVI About page and check if all the folders are writable. If not set right permissions and run 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. # 18
Accepted Answer Pending Moderation
Hi tharuna.

We have runned the import but we get the attached error.

imp1.jpg
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 19
Accepted Answer Pending Moderation
Hello,
I did little more changes to CSVI image download code and applied the patch on your site. Ran the import using K2_import template with your import XML for about 200 products and now i see images are downloaded fine. Can you run the import now and let me know?
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. # 20
  • Page :
  • 1
  • 2


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