RO CSVI

Backup/Restore Templates

| RO CSVI

Backup and Restore templates

Requirements

  • CSVI 6.0+
  • Joomla 2.5+
  • PHP 5.2+

Backup Templates

CSVI provides an option of backing up your templates and restore them whenever needed. It can be done from maintainence tab, select the templates needs to be backedup and the folder path where file has to be stored, click on continue on top corner.

 

Once the Process is completed, CSVI would notify the message with the number of templates and the log information. The path and the name of the backup file name is also displayed with the message.

 

An example of backup file can be seen clicking here

Restore Templates

CSVI provides an option of restoring the templates using the file created on backup process. This helps in saving the time of creating templates again when needed. This can be accomplished using maintainence tab. Choose the XML file generated in backup process and click on continue on top corner

Once the process is complete, CSVI would notify the number of templates restored.

Read more ...

Manage timeouts

| RO CSVI

When doing any kind of import, it is not uncommon to run into timeout problems. There are several reasons for this:

  • The import file is too big for your server settings
  • Retrieving external images takes too much time
  • Incorrect template settings

Why does the server have limits?

The server has limits to prevent you from overloading and possibly bring down the server. This is usual on shared hostings because the hosting provider doesn't want you to trouble your neighbours, same as you don't want your neighbour to bring down the server. If you have a VPS you have more freedom to do what you like as you have more resources available. On a dedicated server you can do as you please as you are the only one on the server, bringing it down will only affect you.

How do I change the server limits?

You can't is the short answer. Hosting providers have these limits in place to make sure the server does not get overloaded on shared hosting accounts. If you have a VPS or dedicated server, you can probably increase the server limits to whatever you have available on your server. Contact your hosting provider on how to do this for your server.

How to change the CSVI import limits?

The import limits used by CSVI can be changed in the template after clicking on the Advanced button. This will show the Limit tab and it's options.

Template limit

By setting the Override system limits to Yes, these settings are activated. On import CSVI will set these settings but this is no guarantee that they will be used. The server can and usually is setup to ignore these settings, on a dedicated server this usually can be used. The advice is not to use these settings unless you are sure they can be used on your server.

The Limit tab contains 2 settings:

  • Lines per import
  • Time between imports
    No need to change this one

The Lines per import is the one we are going to change, as it determines how many lines CSVI should read before restarting. How many lines this needs to be depends on your server. A rule of thumb is that an import run cannot last longer than 30 seconds, so you need to find out how many lines you can process within 30 seconds. A value of 0 means, read the whole file, never restart. Any other value will be the number of lines CSVI processes before restarting.

An example, your file has 5000 lines to import but the import stops at 543 lines because that is what the server can handle in 30 seconds. We set the Lines per import to 400 and save the settings. What happens now is that CSVI process the first 400 lines, waits 5 seconds and restarts. After the restart it reads the next 400 lines, waits 5 seconds and restarts again. This process continues until CSVI has read all 5000 lines and then finalizes the import.

If you find out that with Lines per import set to 400 it still times out, lower the number to 300 and try again. This is always a trial and error process since it all depends on your server.

Large files, what do I need?

You need patience, large files take time to import.

What is the perfect setting for my large file?

There is no answer to this, since it is your file, you will have to test the settings for your file on your server.

Read more ...

Troubleshooting export errors

| RO CSVI

Often when we export files we run into errors. Where to start looking for the cause of the issue and how to solve this?

Checkpoints

Follow these checkpoints to make sure that you have the basics right.

  1. Up-to-date Available Fields
    The list of available fields should be up-to-date before importing starts. If the field list is not up-to-date the import may fail due to missing fields. To update the list of available fields go to Maintenance -> Available Fields -> Click Update
  2. Template enabled
    If a template does not show up in the list of templates to export, the template is not enabled. Go to Templates -> Templates, find your template and click on the icon in the Enabled column or select the template and click Publish in the toolbar.
  3. Template fields enabled
    The export file is empty, this can happen when the template fields are not published. Go to Templates -> Template fields, find your template and check if the fields are enabled.
  4. Export folder writable
    CSVI writes the export data temporarily to a file on the server before it is further processed. The file is placed in the folder tmp/com_csvi/export. The webserver needs to have write access to this folder.
  5. Duplicates in the export file
    It can happen that the export file contains duplicates, this happens because of the selection that needs to be made to export all the requested fields. The solution to this is to group based on the duplicate fields. This can be done on the fields page of the template.

Read more ...

Troubleshooting import errors

| RO CSVI

Often when we import files we run into errors that the file is not being read correctly. Where to start looking for the cause of the issue and how to solve this?

Checkpoints

Follow these checkpoints to make sure that you have the basics right.

  1. Up-to-date Available Fields
    The list of available fields should be up-to-date before importing starts. If the field list is not up-to-date the import may fail due to missing fields. To update the list of available fields go to Maintenance -> Available Fields -> Click Update or follow Missing fields in RO CSVI document.
  2. A clean CSV file
    A CSV file should not have any extra characters in any place. A good CSV file may look like this:
    "product_sku","product_name"
    A bad CSV file may look like this:
    "product_sku,product_name"
      Here the " at the beginning and end of the line are wrong
    product_sku,product_name,
    Here the trailing comma is wrong
  3. Delimiters
    The template must use the same delimiters as your file has. The type of delimiters does not matter. To know what delimiters your file uses look at your file with Notepad for example.
    Some examples of delimiters are:
    Sample Field delimiter Text enclosure
    "product_sku","product_name" , "
    ~product_sku~^~product_name~ ^ ~
    product_sku|product_name |  

    Check that you have the delimiters filled in your template settings. RO CSVI needs this to know how to read the CSV file. Alternatively you can use the Automatic delimiter detection.
  4. Encoding
    The file must always be encoded in UTF-8 format. No other encoding is supported. See this Save file as UTF-8 on how to save your file as UTF-8 using Notepad2 or using LibreOffice/OpenOffice. This is important because files imported not in UTF-8 encoding will not import correctly with special characters like ë and sentences will be cut off.
  5. Field names
    Use only fieldnames that are available for the type of import you are doing. To see which fieldnames are available go to RO CSVI ---> Available Fields and filter on the type of import you want to do. It is not possible to use any other name. This means that if your CSV file contains the names sku, price, name that these cannot be used, you have to translate them to RO CSVI fieldnames. Your column names will change like this:
    • sku --> product_sku
    • price --> product_price
    • name --> product_name
    This needs to be done for all the fields in your file.
  6. Field data
    Make sure the data is properly formatted according to the specifications. Information on the fields can be found in respective tutorials.
  7. Line endings
    It is best to use Unix or Windows line endings. Mac line endings can give issues, by default they are not supported by PHP. If you have Mac line endings, you can select the option I'm Mac in your template, this will tell RO CSVI to try to read Mac line endings.
  8. Use the RO CSVI Analyzer to check your file for any issues. The CSVI Analyzer is included in RO CSVI and can be found by going to Components -> RO CSVI  -> Maintenance -> Analyzer.
  9. Check the debug information
    The debug report shows every step RO CSVI takes when importing the file. See the How to collect debug information on how to get your debug report. Check the debug information for anything that might be going wrong or post it in the forum.

After having checked these checkpoints your import should be running smoothly. Check out also this Does my CSV file look correct tutorial on checking your CSV file.

Read more ...

Removing HTML tags on export

| RO CSVI

The removal of HTML tags on export is a question that is quite simple to do with CSVI using the Replacement feature.

Requirements:

  • CSVI 7 or higher

Steps to remove HTML tags:

  1. Go to Components -> CSVI
  2. Click on Rules in the left menu
  3. Click on New
  4. Fill in a name for the replacement rule
  5. Select the Action
  6. Select the plugin CSVI Multireplace
  7. Click on Save to store the settings and load the rule
  8. Now select the Operation Find and replace
  9. Fill in Find with /<[\/\!]*?[^<>]*?>/i
  10. Leave Replace empty
  11. Set Multiple values to No
  12. Set Method to Regular expression
  13. Optionally set an order
  14. Click on Save & Close
  15. Go to Template fields
  16. Select the template where you want to apply the replacement rule to
  17. Click on the fieldname where the rule needs to be applied to
  18. Now under Rules select the rule you created
  19. Click on Save & Close to save the changes
  20. You will see a wand behind the fieldname indicating that a rule has been applied
  21. Run the export on your export template and you will see that the exported file will have no HTML in the chosen field

Read more ...