clickandmortar / advancedcsvconnectorbundle Goto Github PK
View Code? Open in Web Editor NEWAdvanced CSV Connector Bundle for Akeneo
Home Page: https://www.clickandmortar.fr/blog/akeneo-csv-advanced-connector
Advanced CSV Connector Bundle for Akeneo
Home Page: https://www.clickandmortar.fr/blog/akeneo-csv-advanced-connector
The command
composer require "clickandmortar / advanced-csv-connector-bundle": "1.8. *"
Does not download version 1.8.4 but version 1.8.1.
Do not run Composer as root/super user! See https://getcomposer.org/root for details
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing clickandmortar/advanced-csv-connector-bundle (1.8.1): Loading from cache
Example the file Helper / ExportHelper.php on the repository starts with
<?php
namespace ClickAndMortar\AdvancedCsvConnectorBundle\Helper;
use Akeneo\Pim\Structure\Bundle\Doctrine\ORM\Repository\AttributeOptionRepository;
use Doctrine\ORM\EntityManager;
use Symfony\Component\Process\Process;
/**
* Export helper
While the version downloaded by composer starts with
namespace ClickAndMortar\AdvancedCsvConnectorBundle\Helper;
use Akeneo\Pim\Structure\Bundle\Doctrine\ORM\Repository\AttributeOptionRepository;
use Doctrine\ORM\EntityManager;
/**
* Export helper
I'm use Akeneo 4.0.59 CE
I would like to request a lua guide on how to import metrics.
If I read the warning it says properties like length with a measurement type attribute requires an array with the key unit. I've attempted to return an array through lua script however, returning an array is giving results I dont understand.
If I return a single value, like for instance 10
return 10
The logged result is:
length":[{"locale":null,"scope":null,"data":{"amount":10,"unit":null}}]
which makes somewhat sense.
If I return the following:
`array = {}
array['unit'] = KILOGRAM
array['amount'] = attributeValue
return array`
the result is:
length":[{"locale":null,"scope":null,"data":{"amount":null,"unit":Array}}]
I have attempted multiple other array formats but the result remains the same. If I return an array the amount is null. I've also attempted returning comma separated values with no results.
Import and export fails no options when creating a profile
Hi,
first of all I wanna thank you for your efforts and sharing your work.
The installation instructions seem not to be fully correct. Is it really a "," at the end of the line? The specific lines need to be terminated by a ";", right? Please see below.
new Pim\Bundle\CustomEntityBundle\PimCustomEntityBundle(),
new ClickAndMortar\AdvancedCsvConnectorBundle\ClickAndMortarAdvancedCsvConnectorBundle(),
However, even with a ";" I get an error when updating the database.
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "PimCustomEntityBundle" from namespace "Pim\Bundle\CustomEntityBundle".
Did you forget a "use" statement for another namespace? in /home/sven/akeneo/pim-community-standard/app/AppKernel.php:40
The functions inside the AppKernel.php looks with the two added lines like this:
public function registerBundles()
{
$bundles = $this->registerProjectBundles();
if (in_array($this->getEnvironment(), array('dev', 'test', 'behat'))) {
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
$bundles[] = new Pim\Bundle\CustomEntityBundle\PimCustomEntityBundle();
$bundles[] = new ClickAndMortar\AdvancedCsvConnectorBundle\ClickAndMortarAdvancedCsvConnectorBundle();
}
$bundles = array_merge(
$this->getSymfonyBundles(),
$this->getOroDependencies(),
$this->getOroBundles(),
$this->getPimDependenciesBundles(),
$this->getPimBundles(),
$bundles
);
return $bundles;
}
I updated with the latest version of the 1.6 CE branch and on the script creation page I leave the default values and just press the test button.
Nothing happens and in the firefox debug tools I have this error :
16:46:50,907 Error: The route "candm_advanced_csv_connector_api_luaUpdater_test" does not exist. 2 main.min.js:1:943648
i http://xxxxxxdev/dist/main.min.js?f0cd7ae10aa827e01d407b533e167e76:1
m http://xxxxxxdev/dist/main.min.js?f0cd7ae10aa827e01d407b533e167e76:1
click .AknButton--apply http://xxxxxxdev/dist/main.min.js?f0cd7ae10aa827e01d407b533e167e76:1
click .AknButton--apply self-hosted:1025
dispatch http://xxxxxxdev/dist/vendor.min.js?f0cd7ae10aa827e01d407b533e167e76:1
handle http://xxxxxxdev/dist/vendor.min.js?f0cd7ae10aa827e01d407b533e167e76:1
We did the installation and the configuration of this connector regarding the documentation. We set 2 attributes (type text and textarea) at the import-mapping with the option "only on creation" = yes. But changes who where made after creation of the article at those 2 attributes at the pim, are always replaced by the values who are delivered through a later import with the same file.
Those two attributes shall be imported only once, when the article is created, not when the article is updated through an import. Or is the option "only on creation" explicit for a static set value at the option "default value"? This is not clear at the documentation.
Used akeneo version: CE 3.2.17
Hello, with this command
php bin/console --env=prod pim:installer:assets --symlink --clean
I've this error :
In YamlFileLoader.php line 693:
The file "/var/www/html/pim-community-standard/vendor/clickandmortar/advanced-csv-connector-bundle/DependencyInjection/../Resources/config/helpers.yml" does not contain valid YAML: "The reserved indicator "%" cannot start a plain scalar; you need to quote the scalar at line 15 (near "class: %candm_advanced_csv_connector.helper.export.class%").".
In Inline.php line 305:
The reserved indicator "%" cannot start a plain scalar; you need to quote the scalar at line 15 (near "class: %candm_advanced_csv_connector.helper.export.class%").
The error is on line 15 of helpers.yml. We must replace
class:% candm_advanced_csv_connector.helper.export.class%
by
class: '% candm_advanced_csv_connector.helper.export.class%'
In validators.yml, replace :
class: %candm_advanced_csv_connector.validator.lua_script.class%
To
class: '%candm_advanced_csv_connector.validator.lua_script.class%'
In controllers.yml, replace
class: %candm_advanced_csv_connector.controller.lua_updater.class%
To
class: '%candm_advanced_csv_connector.controller.lua_updater.class%'
See #39
Hello,
When a field contains the following character the export fails:
By continuing to search I think I have found the cause. If the field is of text type, the presence of a special character prevents the export, but if it is of type text zone then there is no problem for exporting with special characters.
Akeneo 3.2.11 CE / ACCB 1.6.10
Hello,
I created an export repository with some fields as drop-down lists. In the "Use label" column I select "Yes" and save. I go on another page of the PIM and come back to my export reference. I edit it and modify other values and record.
I go again on another page of the PIM and come back on my referential that I publish. All fields whose "Use label" were "Yes" changed to "No"
Would it be possible to have a connector that is able to write directly to an Excel file?
It is simpler when sending a file when the recipient does not master the csv format.
Hello, I am trying to install version 1.8 on Akaneo 4.0.59 and when I run the command:
php bin/console --env=prod pim:installer:assets --symlink --clean
I have the error :
In DefinitionErrorExceptionPass.php line 54:
You have requested a non-existent parameter "media_url_prefix".
While my app/config/parameters.yml file does contain the media_url_prefix variable
index_hosts: 'localhost: 9200'
installer_data: 'PimInstallerBundle:minimal'
media_url_prefix: 'http://myserver/files/catalog'
Since version 1.8.3 the mention to the media_url_prefix parameter has disappeared from the documentation, is this normal?
See #39
This csv file will not import as it will break on the returns that are part of the HTML fields. This file will import and export out of google sheets just fine but when it goes into akeneo advanced csv it will break it apart based on the embed \n returns.
It should be able to process /n that is encapsulated such as " some text \n some text \n"
"sku","attribute_set","type","store","configurable_attributes","size_color","name","short_description","description","price","qty","is_in_stock","manage_stock","use_config_manage_stock","status","visibility","weight","categories","thumbnail","small_image","image","media_gallery","special_price","special_from_date","special_to_date","age_grade","condition","era","series","manufacturer","brand","product_type","material","scale","product_available","meta_keyword","fet_tax","tier_price:dealer1","tier_price:dealer2"
"AL 25854","Default","simple","admin","","","LOAD CONTROLLER SINGLE HEAVY DUTY COMPESSOR SYSTEM - AIR LIFT","<p><span style=""font-family: Calibri;"">LoadController Single On Board Air Compressor System is the quick and convenient way to inflate and deflate your vehicle’s air springs while on the go. The last place you probably want to drive your loaded vehicle and trailer is into a tiny gas station to fill up your air springs. With a LoadController Single air compressor system, you can forget about having to search out an air compressor to inflate your air springs ever again!</span></p>
<ul>
<li>
<p><strong>With the touch of a button, control the pressure in your air springs from the cab of your vehicle.</strong> This is extremely convenient for changes in load or road conditions. If you’ve just hooked up your RV, trailer or put a load in the bed of your truck, you can inflate your air springs to the desired pressure right from the cab. No more searching for a gas station compressor to find air!</p>
</li>
<li>
<p><strong>The gauge mounts in your vehicle’s cab and operates regardless of whether you are parked or on the road.</strong> The user-friendly gauge has easy-to-use inflate and deflate buttons to let you quickly inflate or deflate your vehicle’s air spring pressure. Mount in the included mounting cup, flush mount or insert into any 2 1/8 inch gauge pod.</p>
</li>
<li>
<p>LoadController Single On-Board Air Compressor System provides single path airflow for your vehicle’s air springs. This means your left and right air springs inflate and deflate equally to the same pressure. For independent control of the left and right air springs, see our LoadController Dual products (part numbers 25852 and 25856).</p>
</li>
<li>
<p>This system includes a heavy duty compressor, manifold, wiring harness, air lines, gauge, customizable gauge pod and all the hardware you need to install. The heavy duty compressor is best for frequent users of the system, and it inflates faster and more quietly than our standard compressor.</p>
</li>
<li>
<p>The compressor mounts easily to your vehicle’s frame and attaches to an air line that runs to your air springs</p>
</li>
<li>
<p>You can install the system yourself in a few hours with the help of a fully illustrated easy-to-follow installation manual. If you prefer, have one of our skilled dealer/installers throughout the US and Canada take care of it for you.</p>
</li>
<li>
<p>As an added safety measure, LoadController Single automatically senses low air spring pressure and immediately activates to maintain a safe pressure level.</p>
</li>
<li>
<p>All Air Lift compressor systems are compatible with any brand of air springs.</p>
<p><em>Easy Installation</em></p>
<p>The LoadController Single system installs with common mechanic tools in a few hours. Follow these steps:</p>
</li>
</ul>
<ul>
<li>
<p>Install the compressor using the hardware provided.</p>
</li>
<li>
<p>Mount the gauge</p>
</li>
<li>
<p>Install the electrical components</p>
<p>Details and installation time vary by application. A complete illustrated instruction manual is included with each kit.</p>
<p> </p>
</li>
</ul>","<p><span style=""font-family: Calibri;"">LoadController Single On Board Air Compressor System is the quick and convenient way to inflate and deflate your vehicle’s air springs while on the go. The last place you probably want to drive your loaded vehicle and trailer is into a tiny gas station to fill up your air springs. With a LoadController Single air compressor system, you can forget about having to search out an air compressor to inflate your air springs ever again!</span> </p>","291.9000","0.00","1","0","1","1","4","6.000","Suspension Accessories/Air Lift Air Bags & Accessories/Air Lift Compressors & Accessories","/AL25854__lg.jpg","/AL25854__lg.jpg","/AL25854__lg.jpg","","","","","","","","","","","","","","","","","1:262.71","1:262.71"
"AL 25856","Default","simple","admin","","","LOAD CONTROLLER DUAL HEAVY DUTY COMPESSOR SYSTEM - AIR LIFT","<p>LoadController Dual On Board Air Compressor System is the quick and convenient way to inflate and deflate your vehicle''s air springs while on the go. The last place you probably want to drive your loaded vehicle and trailer is into a small gas station to fill up your air springs. With a LoadController Dual air compressor system, you can forget about having to search out an air compressor to inflate your air springs ever again!</p>
<p>With the touch of a button, control the pressure in your air springs from the cab of your vehicle.This is extremely convenient for changes in load or road conditions. If you’ve just hooked up your RV, trailer or put a load in the bed of your truck, you can inflate your air springs to the desired pressure right from the cab. No more searching for a gas station compressor to find air!</p>
<p>LoadController Dual On-Board Air Compressor System provides dual path airflow for your vehicle''s air springs. This means your left and right air springs can be set to independent pressures. This is particularly helpful if you have more weight on one side of the vehicle than the other. It also prevents air from transferring between air springs, allowing for more stable cornering and body roll. For equal inflation/deflation of the left and right air springs, see our LoadController Single product page.</p>
<p>The gauge mounts in your vehicle''s cab and operates regardless of whether you are parked or on the road. The user-friendly gauge has easy-to-use inflate and deflate buttons to let you quickly inflate or deflate your vehicle''s air spring pressure. Mount in the included mounting cup, flush mount or insert into any 2 1/8 inch gauge pod.</p>
<p>This system includes a heavy duty compressor, wiring harness, air lines, gauge, customizable gauge pod for easy installation and all the tools you need to install.</p>
<p>The compressor mounts easily to your vehicle''s frame and attaches to an air line that runs to your air springs</p>
<p>This system includes a heavy duty compressor, which is best for frequent users of the system, and it inflates faster and more quietly than our standard compressor.</p>
<p>As an added safety measure, LoadController Dual automatically senses low air spring pressure and immediately activates to maintain a safe pressure level.</p>
<p>All Air Lift compressor systems are compatible with any brand of air springs.</p>
<p>The LoadController Dual installs with common mechanic tools in a few hours.</p>","<p>LoadController Dual On Board Air Compressor System is the quick and convenient way to inflate and deflate your vehicle''s air springs while on the go. The last place you probably want to drive your loaded vehicle and trailer is into a small gas station to fill up your air springs. With a LoadController Dual air compressor system, you can forget about having to search out an air compressor to inflate your air springs ever again!</p>
<p>With the touch of a button, control the pressure in your air springs from the cab of your vehicle.This is extremely convenient for changes in load or road conditions. If you''ve just hooked up your RV, trailer or put a load in the bed of your truck, you can inflate your air springs to the desired pressure right from the cab. No more searching for a gas station compressor to find air!</p>
<p>LoadController Dual On-Board Air Compressor System provides dual path airflow for your vehicle''s air springs. This means your left and right air springs can be set to independent pressures. This is particularly helpful if you have more weight on one side of the vehicle than the other. It also prevents air from transferring between air springs, allowing for more stable cornering and body roll. For equal inflation/deflation of the left and right air springs, see our LoadController Single product page.</p>","444.5500","0.00","1","0","1","1","4","7.000","Suspension Accessories/Air Lift Air Bags & Accessories/Air Lift Compressors & Accessories","/AL25856__lg.jpg","/AL25856__lg.jpg","/AL25856__lg.jpg","","","","","","","","","","","","","","","","","1:400.10","1:400.10"
Hi,
First of all, thank you for sharing your work!
I have some issues with the onlyOnCreation feature for the import mappings. The issue is that it completely seems to ignore the boolean set for the attributes.
[{ "attributeCode": "sku", "dataCode": "ZI_NUMBER", "identifier": true, "onlyOnCreation": false, "deleteIfNull": false }, { "attributeCode": "alh_nummer", "dataCode": "PRODUCT_GBD_ID", "identifier": false, "onlyOnCreation": true, "deleteIfNull": false }, { "attributeCode": "productnaam-nl_NL", "dataCode": "DESCRIPTION", "identifier": false, "onlyOnCreation": true, "deleteIfNull": false }, { "attributeCode": "verkoopprijs-nl_NL-EUR", "dataCode": "CONSUMER_PRICE", "identifier": false, "onlyOnCreation": false, "deleteIfNull": false }, { "attributeCode": "inkoopprijs-EUR", "dataCode": "BEST_PRICE", "identifier": false, "onlyOnCreation": false, "deleteIfNull": false }, { "attributeCode": "ean_code", "dataCode": "EANCODE", "identifier": false, "onlyOnCreation": false, "deleteIfNull": false } ]
Is there something else I need to set in order for the onlyOnCreation: true to work? Can you reproduce this issue as well?
Thank you!
Kind regards,
Karen
Hello, is there an update of the connector to make it compatible with Akeneo 3.1 or 3.0?
Hello are there any plans to release ACC for Akeneo 4.0?
Hello,
this failed to install on Akeneo 4.0.3 CE in the presence of composer 2.0. The error reads:
Your requirements could not be resolved to an installable set of packages.
Problem 1
symfony/flex v1.6.2 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
akeneo/pim-community-dev v4.0.3 requires symfony/flex ^1.4 -> satisfiable by symfony/flex[v1.6.2].
akeneo/pim-community-dev is locked to version v4.0.3 and an update of this package was not requested.
Is this a known problem?
Hi there,
is there a reason to test the input value with empty()
There is no possibility to test with 0
as input
An empty string could be a nice test case for scripts.
A nil
value as well. Maybe a second button to test nil/null values would be nice.
Best Regards,
Marco
After I installed this it somehow broke the frontend build on Akeneo 7
yarn run webpack
....
ERROR in ./public/js/module-registry.js 2:114720-114775
Module not found: Error: Can't resolve 'custom_entity/remover/reference-data' in '/home/akeneo/pim-community-standard/public/js'
@ ./vendor/akeneo/pim-community-dev/frontend/webpack/require-context.js
@ ./public/bundles/pimui/js/form/builder.js
@ ./public/bundles/pimui/js/index.js
25 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
Hi Click and Mortar team, thank you for a truly amazing module, with the release of Akeneo 5 I was wondering if this is still compatible or will need to be updated to work correctly?
Hi,
When i use transform field for attach LUA script my import failed without error log or summary.
Even a simple script like
attributeValue="Bagage" return attributeValue;
BTW thanks for this plugin !
-------------------- Edit ---------------------------
Job import error log says Class 'Lua' not found
In ProductAdvancedReader.php line 385:
Attempted to load class "Lua" from the global namespace.
Did you forget a "use" statement?
Lua and pecl lua are installed and displayed in phpinfo.
There a bundle or wrapper to install for symfony ?
Thank
Hello,
First thank you for sharing your extension. I wanted to give it a try and ran it but got a server error:
The service "candm_advanced_csv_connector.processor.normalization.advanced_product" has a dependency on a non-existent parameter "media_url_prefix"
Did I miss something to install or configure? I went through your description so far.
After installing version 1.7, when I use akeneo I have this message that appears
And in the logs I
[2019-09-12 16:20:30] request.INFO: Matched route "pim_datagrid_load". {"route":"pim_datagrid_load","route_parameters":{"_controller":"pim_datagrid.controller.datagrid:loadAction","alias":"export-profile-grid","_route":"pim_datagrid_load"},"request_uri":"http://svmedia01dev/datagrid/export-profile-grid/load?export-profile-grid%5BjobType%5D=export&export-profile-grid%5BlocaleCode%5D=fr_FR&jobType=export&localeCode=fr_FR¶ms%5BjobType%5D=export¶ms%5BlocaleCode%5D=fr_FR","method":"GET"} [] [2019-09-12 16:20:30] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Type error: Argument 6 passed to ClickAndMortar\AdvancedCsvConnectorBundle\Reader\File\Csv\ProductAdvancedReader::__construct() must be an instance of Akeneo\Pim\Permission\Bundle\Persistence\ORM\EntityWithValue\ProductRepository, instance of Akeneo\Pim\Enrichment\Bundle\Doctrine\ORM\Repository\ProductRepository given, called in /var/www/html/pim-community-standard/var/cache/prod/ContainerFcpxp84/getCandmAdvancedCsvConnector_Reader_File_CsvAdvancedProductService.php on line 8" at /var/www/html/pim-community-standard/vendor/clickandmortar/advanced-csv-connector-bundle/Reader/File/Csv/ProductAdvancedReader.php line 193 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Type error: Argument 6 passed to ClickAndMortar\\AdvancedCsvConnectorBundle\\Reader\\File\\Csv\\ProductAdvancedReader::__construct() must be an instance of Akeneo\\Pim\\Permission\\Bundle\\Persistence\\ORM\\EntityWithValue\\ProductRepository, instance of Akeneo\\Pim\\Enrichment\\Bundle\\Doctrine\\ORM\\Repository\\ProductRepository given, called in /var/www/html/pim-community-standard/var/cache/prod/ContainerFcpxp84/getCandmAdvancedCsvConnector_Reader_File_CsvAdvancedProductService.php on line 8 at /var/www/html/pim-community-standard/vendor/clickandmortar/advanced-csv-connector-bundle/Reader/File/Csv/ProductAdvancedReader.php:193)"} []
I am in Akeneo 3.2CE and a priori version 1.7 of the connector is planned for the 3.2EE. I should install version 1.6 but how to choose the version to install?
I am getting 404 error when try and create a lua script
With last version 1.6.8 and Akeneo 3.2.11 CE, I created a lua (year1month) script that contains this code (really simple):
return attributeValue*12;
At the interface level I have this message
It is not very clear and in the logs I have
[2019-10-18 09:19:52] request.INFO: Matched route "pim_customentity_rest_edit". {"route":"pim_customentity_rest_edit","route_parameters":{"_controller":"pim_custom_entity.controller:executeAction","actionType":"rest_update","customEntityName":"luaUpdater","id":"2","_route":"pim_customentity_rest_edit"},"request_uri":"http://media/reference-data/rest/luaUpdater/2/edit","method":"POST"} []
[2019-10-18 09:19:52] request.CRITICAL: Uncaught PHP Exception LuaException: "[string "line"]:2: attempt to perform arithmetic on global 'attributeValue' (a string value)" at /var/www/html/pim-community-standard/vendor/clickandmortar/advanced-csv-connector-bundle/Validator/LuaScriptValidator.php line 46 {"exception":"[object] (LuaException(code: 1): [string \"line\"]:2: attempt to perform arithmetic on global 'attributeValue' (a string value) at /var/www/html/pim-community-standard/vendor/clickandmortar/advanced-csv-connector-bundle/Validator/LuaScriptValidator.php:46)"} []
I have the impression that the error message should appear on the side of Akeneo but that is not the case.
I tested a code variant:
num = tonumber(attributeValue)*12;
return num;
And i've this in log
[2019-10-18 09:31:18] request.INFO: Matched route "pim_customentity_rest_edit". {"route":"pim_customentity_rest_edit","route_parameters":{"_controller":"pim_custom_entity.controller:executeAction","actionType":"rest_update","customEntityName":"luaUpdater","id":"2","_route":"pim_customentity_rest_edit"},"request_uri":"http://media/reference-data/rest/luaUpdater/2/edit","method":"POST"} []
[2019-10-18 09:31:18] request.CRITICAL: Uncaught PHP Exception LuaException: "[string "line"]:2: attempt to call global 'tonumber' (a nil value)" at /var/www/html/pim-community-standard/vendor/clickandmortar/advanced-csv-connector-bundle/Validator/LuaScriptValidator.php line 46 {"exception":"[object] (LuaException(code: 1): [string \"line\"]:2: attempt to call global 'tonumber' (a nil value) at /var/www/html/pim-community-standard/vendor/clickandmortar/advanced-csv-connector-bundle/Validator/LuaScriptValidator.php:46)"} []
In addition to the problem of displaying errors, is there a particular code structure to respect?
I see that in composer.json akeneo-labs/custom-entity-bundle
required version of 7.0.*
, how can you require this version if this version is not released and not visible in packagist?
When exporting a product with a reference, the order of the columns defined in the export job is not respected.
I created a reference containing the following columns in this order with these mapping rules:
I create a new export using this reference. By default, Akeneo sorts the columns alphabetically when exporting and ACCB follows the same rule. So in the export I select the fields to export and use the same order as in the reference. I export and unfortunately the order defines in the export is not preserved, it is sorted again in alphabetical order.
Result:
des30;des80;des240;gtin;refcial
I perform the same test using the standard Akeneo export and there is no problem. My export is in the order defined in the job.
This ticket is close to this #22 but is not really adding a feature, it is rather the respect of a planned operation by Akeneo.
when I want to create a lua script, I give it a name and a code (year2months), I click on "Save" but I'm stuck on this window
In apache logs I have this error
[2019-10-07 17:16:05] request.INFO: Matched route "pim_customentity_rest_create". {"route":"pim_customentity_rest_create","route_parameters":{"_controller":"pim_custom_entity.controller:executeAction","actionType":"rest_create","customEntityName":"luaUpdater","_route":"pim_customentity_rest_create"},"request_uri":"http://xxxx/reference-data/rest/luaUpdater/create","method":"POST"} []
[2019-10-07 17:16:05] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\ClassNotFoundException: "Attempted to load class "Lua" from the global namespace. Did you forget a "use" statement?" at /var/www/html/pim-community-standard/vendor/clickandmortar/advanced-csv-connector-bundle/Validator/LuaScriptValidator.php line 41 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\ClassNotFoundException(code: 0): Attempted to load class \"Lua\" from the global namespace.\nDid you forget a \"use\" statement? at /var/www/html/pim-community-standard/vendor/clickandmortar/advanced-csv-connector-bundle/Validator/LuaScriptValidator.php:41)"} []
Hi,
I'm running Akeneo version 4.0.3 and have just added Advanced CSV Connector version 1.8.12 following the instructions on the Akeneo marketplace.
I can add Export mappings, but when I try to add an Import mapping or LUA script, nothing happens. I can add the label and code on the Create Import Mapping screen, but when I click on Save, the page blinks but not further happens. In the browser console I can see that POST https://akeneo.xyz.com/reference-data/rest/importMapping/create
results in 500 Internal Server Error
. The same holds for adding a LUA script.
I hope you can help me fix this problem so I can add my Import mappings.
Thanks!
Hello,
In a future version, it is planned the possibility of dupplicate a mapping. Sometimes there is little difference between two mapping and instead of doing everything again it would be easier to copy it.
I'm trying to write the following lua script with Akaneo 3.2.17 CE with ACCB 1.6
num = attributeValue*12
str = tostring(num)
return str
But I have the error when I want to save the script
In log i've
[2019-11-13 11:08:32] request.INFO: Matched route "pim_customentity_rest_edit". {"route":"pim_customentity_rest_edit","route_parameters":{"_controller":"pim_custom_entity.controller:executeAction","actionType":"rest_update","customEntityName":"luaUpdater","id":"3","_route":"pim_customentity_rest_edit"},"request_uri":"http://svmedia01dev/reference-data/rest/luaUpdater/3/edit","method":"POST"} []
[2019-11-13 11:08:32] request.CRITICAL: Uncaught PHP Exception LuaException: "[string "line"]:3: attempt to call global 'tostring' (a nil value)" at /var/www/html/pim-community-standard/vendor/clickandmortar/advanced-csv-connector-bundle/Validator/LuaScriptValidator.php line 46 {"exception":"[object] (LuaException(code: 1): [string \"line\"]:3: attempt to call global 'tostring' (a nil value) at /var/www/html/pim-community-standard/vendor/clickandmortar/advanced-csv-connector-bundle/Validator/LuaScriptValidator.php:46)"} []
I tested on my machine with a local lua script
num = 2*12
str = tostring(num)
print(str)
#lua test.lua
24
Hello,
Since version 1.8.12 for an export, the order defined in the repository is respected. But in evolution is that it would be possible to be able to add a line between two already existing.
Currently the only solution is to modify / delete all the mapping after the field you want to add. For a small repository, this is not a problem, but for a 30-field container that has to evolve, it is really not practical.
P.S .: thank you for the latest developments
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.