Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Products or Categories not getting synced with Magento #45

Open
faranki5 opened this issue Apr 24, 2020 · 23 comments
Open

Products or Categories not getting synced with Magento #45

faranki5 opened this issue Apr 24, 2020 · 23 comments

Comments

@faranki5
Copy link

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.

  • Could not update status for object with id: 12484. Status: SUCCESS. Message: category with ID 12484 successfully added to queue

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?

@faranki5
Copy link
Author

@mbolka would you please help out.

@mbolka
Copy link
Contributor

mbolka commented May 13, 2020

@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.

@faranki5
Copy link
Author

@faranki5
Copy link
Author

@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.

@faranki5
Copy link
Author

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.

@faranki5
Copy link
Author

@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') "

@mbolka
Copy link
Contributor

mbolka commented May 21, 2020

@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.

@faranki5
Copy link
Author

@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!

@faranki5
Copy link
Author

Screenshot from 2020-05-28 14-33-12

@faranki5
Copy link
Author

@synchmann
Copy link

synchmann commented May 28, 2020

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 ?

@faranki5
Copy link
Author

@synchmann @mbolka
when i execute the endpoint i get this response:
{
"success": false,
"msg": "Requested object with id 12508 does not exist."
}

@faranki5
Copy link
Author

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.

@faranki5
Copy link
Author

I dont know what do you mean by attribute id. Please take a look at the attached snapshot, my image attribute is shown there.
Screenshot from 2020-06-15 15-56-48

@faranki5
Copy link
Author

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
Copy link

@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.

@faranki5
Copy link
Author

faranki5 commented Jun 16, 2020

@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.
Screenshot from 2020-06-16 18-49-52

@synchmann
Copy link

synchmann commented Jun 18, 2020

@faranki5
Copy link
Author

@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!
Screenshot from 2020-06-19 13-24-59

@faranki5
Copy link
Author

@bpspatel
Copy link

bpspatel commented Jun 3, 2021

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**

@bpspatel
Copy link

bpspatel commented Jun 18, 2021

@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:
#0 /var/www/html/magento2/app/code/Divante/PimcoreIntegration/Listeners/NewAttributeSetListener.php(119): Divante\PimcoreIntegration\Listeners\AttributeSet\NameResolver->getNextPimcoreAttributeSetName()
#1 /var/www/html/magento2/vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): Divante\PimcoreIntegration\Listeners\NewAttributeSetListener->execute(Object(Magento\Framework\Event\Observer))
#2 /var/www/html/magento2/vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Divante\PimcoreIntegration\Listeners\NewAttributeSetListener), Object(Magento\Framework\Event\Observer))
#3 /var/www/html/magento2/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault-> in /var/www/html/magento2/app/code/Divante/PimcoreIntegration/Listeners/AttributeSet/NameResolver.php on line 46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants