Open faranki5 opened 4 years ago
@mbolka would you please help out.
@faranki5 sorry for the delay. Could you send me full logs from magento? Both (bridge connection logs and critical logs) Magneto should show full requests and you should be able to run them manually to see, where the problem is.
@mbolka here are the logs attached. You can see the error in it. I explored the code of the mentioned class in the log, there seems to be no data coming from Pimcore which is basically causing the error.
Moreover, the Pimcore "product-status-update.log" says this "Missing configuration for object: 12498, instanceUrl:http://** hidden URL *** , store view: 1" Even though the configuration on Magento admin is correctly filled.
@mbolka An important note, when i run any syncing commands like "php bin/magento divante:queue-category:process" on Magento it appears with this error: "Registry key "isSecureArea" already exists". This however, i fixed in the code by adding this line of code: "$this->registry->unregister('isSecureArea') "
@faranki5 Please verify that instanceUrl parameter's value that is in your bridge.log file on the line 8 is equal to the instance Url field in your Integration Configuration.
@mbolka well, i tried by adding the exact value of instanceUrl ( url with its parameters) but it didn't work. However, when i tried by removing "Https" in the value of Magento configuration (made exactly the same to Pimcore value), it did work, but i have got additional errors. By running category command on Magento it throws this error in log: "The value of attribute "Image" must be set". I don't understand this. i did upload images to my image attribute also saved and published. Please have a look on attached logs and image. Thanks!
Can you check what response do you get executing this endpoint in postman ?
{your-host}/webservice/rest/category?apikey={pimcore-api-key}&storeViewId={storeId}&instanceUrl={magento-instance-url}&id={category-id}
Have your attribute image a correct id ?
@synchmann @mbolka when i execute the endpoint i get this response: { "success": false, "msg": "Requested object with id 12508 does not exist." }
Even though i do have the category object with this id: 12508. When I hover over my category in Pimcore, it shows me the id number.
I dont know what do you mean by attribute id. Please take a look at the attached snapshot, my image attribute is shown there.
When i run the product command (php bin/magento divante:queue-product:process) on magento 2, it gives me this error on console: "Uncaught Error: Call to undefined method Magento\Framework\App\ResourceConnection\Interceptor::getSchemaName() in app/code/Divante/PimcoreIntegration/Listeners/AttributeSet/NameResolver.php:46"
@synchmann @mbolka when i execute the endpoint i get this response: { "success": false, "msg": "Requested object with id 12508 does not exist." }
It seems like something is wrong with the configuration. Can you show me your integration-configuration object. Check that you have selected the right classes and directories. If your category is not in the right directory it won't be sent to magento.
@synchmann As you can see in the image below i have the right category directory and class in the configuration. I am using the directory "integrated categories" and categories in it. The category class is also correct, when i hover over the category objects it shows me its class name which is exactly the same i have added in the configuration.
@faranki5 You're requesting the wrong storeViewId (1 instead of 0 which is Admin), you can see it by requesting http://phpstack-328383-1173945.cloudwaysapps.com/webservice/rest/object/id/12472?apikey=cba1ca2b47b2576fa79f318463b1941b005bb2617e9bdac69cadf156bb70d82e. Try this endpoint http://phpstack-328383-1173945.cloudwaysapps.com/webservice/rest/category?apikey=cba1ca2b47b2576fa79f318463b1941b005bb2617e9bdac69cadf156bb70d82e&storeViewId=0&instanceUrl=dev5.tonsoftiles.co.uk&id=12508 and you will see data for Magento. Everything looks right.
@synchmann Well, i selected the admin store view in the configuration but when i run the category command on magento, it logs this error: "Could not save category: The value of attribute "Image" must be set". I have attached the snapshot of my image attribute of the class. Please check its settings, could you please tell me what exactly i am missing. I do upload images on the image attribute of my category objects. i have attached the log files, please have a look on it. Thanks!
Hi, When I save and publish object (Category ) from pimcore . It is successfully added to queue and show in magento logs. But when we run command as given below bin/magento divante:queue-category:process bin/magento divante:queue-asset:process Then we get error [2021-06-03 06:36:29] StreamLogger.CRITICAL: Type Error occurred when creating object: **Divante\PimcoreIntegration\Model\CategoryRepository\Interceptor, Too few arguments to function Magento\Catalog\Model\CategoryRepository::__construct(), 3 passed in /var/www/html/magento2/app/code/Divante/PimcoreIntegration/Model/CategoryRepository.php on line 43 and exactly 4 expected [] []
Log are attached in docs as given below bridge.log bridge_critical.log**
@synchmann When I run the product command ( bin/magento divante:queue-product:process ) then get error Initialization processing of products queue. Started at 2021-06-18 06:05:42 Processing... PHP Fatal error: Uncaught Error: Call to undefined method Magento\Framework\App\ResourceConnection\Interceptor::getSchemaName() in /var/www/html/magento2/app/code/Divante/PimcoreIntegration/Listeners/AttributeSet/NameResolver.php:46 Stack trace:
We installed the bridge successfully, configured the pimcore integration class and Magento configuration but can't sync the categories and product. In the log we get the multiple log messages:
This log is created when we save and publish the category in pimcore.
The below logs are created when we run commands in Magento to sync the category
[ERROR] Missing configuration for object: 12484, instanceUrl:***, store view: 0.
Requested object with id 12484 does not exist.
Could not update status for object with id: 12484. Status: ERROR. Message: An error occurred while insert/update category "12484": Notice: Undefined index: data in /microcloud/domains/tondev/domains/dev5.tonsoftiles.co.uk/http/app/code/Divante/PimcoreIntegration/Http/Response/Transformator/CategoryUpdateTransformator.php on line 67
any tips how to debug?