1. koaweb
  2. RO CSVI
  3. Tuesday, 12 September 2017
  4.  Subscribe via email
We have purchased CSVI recently and created both an import and export template and set up all template fields. The import and export works well so far except for a small nuisance. The two date fields we need is not get imported, probably because a difference in date format. I guess this is a typical scenario that can be solved by the multireplace plugin and so tried to set up a find and replace rule. But for some reasons, I cannot trigger the multi-replace plugin to run no matter how I set the template fields rule.

I finally go for the csiaddon plugin and can successfully fix the date format problem by modifying the Custom.php file that comes with com_csvi (we are working with our custom table). However, when I copy the custom file to the template to work as an override, I encountered the "class Com_csviModelImportCustom not found" 500 error.

I have put the custom.php file in the folder administrator/templates/isis/com_csvi/com_csvi/model/import folder and the override is successfully recognized by CSVI so I can set it up in the template. Also tried rename the file and class to Custom1 but encounter a similar error (because the classname is different). I wonder what I have done wrong. Thanks for any pointers for this.

Joseph
Accepted Answer Pending Moderation
Hello Joseph,
But for some reasons, I cannot trigger the multi-replace plugin to run no matter how I set the template fields rule.

Have you set the rule to the needed template fields in CSVI Template fields page? Can you post screenshots on how you had set the rule to check?

I finally go for the csiaddon plugin and can successfully fix the date format problem by modifying the Custom.php file that comes with com_csvi (we are working with our custom table). However, when I copy the custom file to the template to work as an override, I encountered the "class Com_csviModelImportCustom not found" 500 error.

I have put the custom.php file in the folder administrator/templates/isis/com_csvi/com_csvi/model/import folder and the override is successfully recognized by CSVI so I can set it up in the template. Also tried rename the file and class to Custom1 but encounter a similar error (because the classname is different). I wonder what I have done wrong. Thanks for any pointers for this

Which CSVI version are you using? For latest CSVI 7.2.3 version the override file path should be plugins/csviaddon/csvi/com_csvi/model/import/. Please check Override for import/export document to know more on the overrides.
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
Thanks for getting back.

Have you set the rule to the needed template fields in CSVI Template fields page? Can you post screenshots on how you had set the rule to check?.

Yes, I did. The date fields have an icon shown beside the field names. See screenshot attached.

Which CSVI version are you using? For latest CSVI 7.2.3 version the override file path should be plugins/csviaddon/csvi/com_csvi/model/import/. Please check Override for import/export document to know more on the overrides.


My understanding is all joomla override should be placed in a template subfolder. The reference you quoted also agree with my understanding although it is not very clear on the exact location.

Joseph
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Joseph,
Yes, I did. The date fields have an icon shown beside the field names. See screenshot attached.

Your Screenshot looks good. Can you also post the screenshot of your File tab of your template settings?

My understanding is all joomla override should be placed in a template subfolder. The reference you quoted also agree with my understanding although it is not very clear on the exact location.

You're right for override location. The exact location is administrator/templates/isis/html/com_csvi/com_csvi/model/import/custom.php. Can you send me the override file you have created? I will set it as override here and check.
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
Files attached.

Joseph
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Joseph,

The two date fields we need is not get imported, probably because a difference in date format.
How are the date fields imported in your case?
Kind regards,

RolandD

=========================
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. # 5
Accepted Answer Pending Moderation
Thanks Roland. The date field source is in mm/dd/yyyy format. But for mysql, it will need to be in yyyy-mm-dd format.

Anyway, this is not the problem. The problem is the plugin is not triggered at all. I actually modified the plugin to insert a die() when it is called. But that never happens.

Joseph
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello Joseph,
The problem that rule plugin is not triggered because the Use file for configuration is set to Yes in your template settings on File tab. This setting when set to Yes will read the headers from import file and not use the template fields. You set this to No, save the template and run the import again. You should be seeing the rule triggered. I am still looking at the issue with override file.
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. # 7
Accepted Answer Pending Moderation
Thanks Tharuna.
That makes sense. I will see if that enable the rule trigger. Still need to fix the override problem, though. It is an easier and more versatile way to fix the issue.

Joseph
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello Joseph,
Can you load the attached patch file from CSVI maintenance menu and then see if the override problem is solved?

patch_csvi_override_2017_09_16.zip
Attachments (1)
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. # 9
Accepted Answer Pending Moderation
Hi Tharuna,

Thanks for the patch. Work fine without errors after the patch.

Joseph
  1. more than a month ago
  2. RO CSVI
  3. # 10
  • Page :
  • 1


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