RO CSVI
First character missing on import
| RO CSVI
When importing a file that contains extended characters like óéí and other like that it can happen that these characters are missing on import when they are the first character. For example the word Østerrike is imported as sterrike.
This is not a bug in CSVI but a misconfiguration on your server. The server needs to use the UTF-8 locale to be able to identify these characters, any other locale will cause this failure. To fix this, you will most likely need to ask your hosting provider as it is a change on the server.
A temporary work-around that can be used is to use the PHP function setlocale. To do that you need to find out what locales are available on your server. This can be done by opening an SSH session to your server and execute the comamnd:
locale -a
Let's say you find your locale to be nl_NL.utf8. You can change the encoding by adding this code to the administrator/components/com_csvivirtuemart/csvivirtuemart.php file or administrator/components/com_csvi/csvi.php:
setlocale(LC_ALL, 'nl_NL.utf8');
This is best placed after the line:
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );
Replacement: remove last character
| RO CSVI
To drop the last character from a field you can use the Replacement feature of RO CSVI.
Remove last character
- Go to Replacement
- Make a new entry with the following settings
- Select the field you want to apply the rule to
- Find: /(.*)([0-9])$/
- Replace: $1
- Type: Regular expression
- Click on the Add icon
- Do an import of your template
Remove several characters from the end
To remove 3 characters from the end of your data you can use these steps:
- Go to Replacement
- Make a new entry with the following settings
- Select the field you want to apply the rule to
- Find: /(.*)([0-9]{3})$/
- Replace: $1
- Type: Regular expression
- Click on the Add icon
- Do an import of your template
Replace the value 3 between the curly brackets to any number to remove more or less characters
Settings not saved
| RO CSVI
Why?
The error message Settings not saved happens when the database tables are not correctly installed or not installed at all.
How to fix it?
-
Go to http://xx/administrator/index.php?option=com_csvivirtuemart&view=install (replace xx with your domain name)
-
Choose to do an upgrade
- When there are no errors, you can save your Settings
Extra content at the end of the document
| RO CSVI
During the import of an XML file, CSVI VirtueMart can show a notice saying:
Warning: XMLReader::readInnerXml() [xmlreader.readinnerxml]: file:///myxml.xml:22: parser error : Extra content at the end of the document in \administrator\components\com_csvivirtuemart\helpers\file\import\xml.php on line 356
When this happens, it means that your XML file is not valid. Make sure that all opened tags have a closing tag.
Conflict with plugins
| RO CSVI
There are some plugins that break the functionality of CSVI.
Known plugins to break CSVI are:
- Jomsocial update
- Azrul System Mambot For Joomla
- XAJAX System Mambot For Joomla
- YT Framework plugin
- System - VM Affiliate Tracking Plugin
- shlib cache
- vmVendor
XAJAX
Here is a possible solution to fix the conflict between CSVI VirtueMart and xajax. You need to modify the xajax file following these steps:
- Go to the folder /plugins/system/xajax.php
- Open the file xajax.php
- Find the line that says:
$conflictingExtensions = array ();
- Below this line add the following line:
$conflictingExtensions [] = 'com_csvivirtuemart';
- Save the file
- CSVI VirtueMart should now work without a problem