Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

Call to undefined method Magento\Bundle\Model\Product\Type::getConfigurableAttributeCollection() is Fixed as per code #57

Closed
wants to merge 18 commits into from

Conversation

kanhaiya5590
Copy link

magento/magento2#21663 (comment)

We have install facebook-for-magento2 from market place and we see the issue in checkout

As we seen code in https://github.com/facebookincubator/facebook-for-magento2/tree/master Master branch, which will solve most of the issue.

Please do merge the PR into market place branch and move the changes to https://marketplace.magento.com/facebook-facebook-for-magento2.html so all the other users can get proper banifit from extension

zlik and others added 14 commits April 5, 2021 09:58
Summary: Fixed fatal error reported on [Github](#22).

Reviewed By: xiangminxufsu

Differential Revision: D27546304

fbshipit-source-id: f6c04aab
Summary:
updated version to `1.2.7`.

NOTE: The next version should be `1.4.0`.

Reviewed By: xiangminxufsu

Differential Revision: D27567943

fbshipit-source-id: 79d5a811
Summary:
Reverted multi-source inventory implementation as it was causing fatal errors for some sellers: #23.

Bumped version to `1.4.0`.

Reviewed By: xiangminxufsu

Differential Revision: D27724661

fbshipit-source-id: d5ef4df1
Summary:
During setup:di:compile the system will try to create the folder in the wrong position

Pull Request resolved: #27

Reviewed By: zlik

Differential Revision: D27748270

Pulled By: xiangminxufsu

fbshipit-source-id: 405ab90e
Summary:
according to batch api dev doc, additional images is a array of string
https://developers.facebook.com/docs/marketing-api/catalog-batch/reference#supported-fields-batch
currently we are passing a string separated by `,` It seems working but to be safe, we should use array.

Reviewed By: zlik

Differential Revision: D27767114

fbshipit-source-id: bfec15bb
Summary: Remove file that I accidentally did not commit to address #29.

Reviewed By: xiangminxufsu

Differential Revision: D27799683

fbshipit-source-id: ab30d272
Summary: bump to 1.4.1

Reviewed By: zlik

Differential Revision: D27838536

fbshipit-source-id: f296dad1
Summary:
\Magento\Framework\Event\ManagerInterface $eventManager is already part of the context in parent class: \Magento\Framework\App\Action\Action

setup:di:compile is failing with a dependency error message due to this

Pull Request resolved: #30

Reviewed By: zlik

Differential Revision: D27855571

Pulled By: xiangminxufsu

fbshipit-source-id: 631fc459
Summary: add a button to sync categories

Reviewed By: zlik

Differential Revision: D27864976

fbshipit-source-id: 87383173
Summary: add a category attribute to config sync options.When user disable sync, we stopped sync to fb.

Reviewed By: zlik

Differential Revision: D27890278

fbshipit-source-id: 71a7d4d0
Summary: bump to 1.4.2

Reviewed By: zlik

Differential Revision: D27892160

fbshipit-source-id: 7d008e1c
Summary: revise readme.md

Reviewed By: zlik

Differential Revision: D27896105

fbshipit-source-id: c38b023f
)

Summary:
This is a pull request for issue #33

Some more work needs to be done to fully de-couple the Object Manager from this extension, but this will at least stop products from being loaded multiple times when unnecessary.

Pull Request resolved: #37

Reviewed By: zlik

Differential Revision: D27941203

Pulled By: xiangminxufsu

fbshipit-source-id: f15ab9f5
Summary:
When I try to delete a product I get this response:

{
    "validation_status": [
    {
        "errors": [
        {
            "message": "Can not find required field id"
        }]
    }]
}

So this pull request will fixed this issue.

Tested with 9.0 and 10.0 API version.

Pull Request resolved: #32

Test Plan:
Delete succesfully.

{F612860429}

{F612860436}

Differential Revision: D28154515

Pulled By: xiangminxufsu

fbshipit-source-id: 427a791f
@facebook-github-bot
Copy link
Contributor

Hi @kanhaiya5590!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@kanhaiya5590
Copy link
Author

contributors to sign our Contributor License Agreement - Done

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 15, 2021
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@kanhaiya5590
Copy link
Author

kanhaiya5590 commented Jun 15, 2021

I think this is the right to release updated version of FB extension in magento market place, as many others getting issue in there application - @facebook-github-bot

@ecreatestudio
Copy link

Hi, we have found a similar issue in checkout for a simple product calling method: Magento\Catalog\Model\Product\Type\Simple::getConfigurableAttributeCollection()

This only occurs when adding a simple product first that is not associated with a Configurable Product, and then adding a simple product to cart that is associated with a configurable product.

The stack trace is below. Do you think your fix for bundle products will also apply to this similar issue with Simple products?

[2021-05-18 23:51:32] main.CRITICAL: Error: Call to undefined method Magento\Catalog\Model\Product\Type\Simple::getConfigurableAttributeCollection() in /home/web/deployment/flag/releases/8/vendor/magento/module-configurable-product/Helper/Product/Options/Loader.php:52

Stack trace:

#0 /home/web/deployment/flag/releases/8/vendor/magento/module-configurable-product/Model/Product/ReadHandler.php(48): Magento\ConfigurableProduct\Helper\Product\Options\Loader->load(Object(Magento\Catalog\Model\Product\Interceptor))

#1 /home/web/deployment/flag/releases/8/vendor/magento/framework/EntityManager/Operation/Read/ReadExtensions.php(48): Magento\ConfigurableProduct\Model\Product\ReadHandler->execute(Object(Magento\Catalog\Model\Product\Interceptor), Array)

#2 /home/web/deployment/flag/releases/8/vendor/magento/framework/EntityManager/Operation/Read.php(112): Magento\Framework\EntityManager\Operation\Read\ReadExtensions->execute(Object(Magento\Catalog\Model\Product\Interceptor), Array)

#3 /home/web/deployment/flag/releases/8/vendor/magento/framework/EntityManager/EntityManager.php(70): Magento\Framework\EntityManager\Operation\Read->execute(Object(Magento\Catalog\Model\Product\Interceptor), '115', Array)

#4 /home/web/deployment/flag/releases/8/vendor/magento/module-catalog/Model/ResourceModel/Product.php(722): Magento\Framework\EntityManager\EntityManager->load(Object(Magento\Catalog\Model\Product\Interceptor), '115')

#5 /home/web/deployment/flag/releases/8/vendor/magento/framework/Model/AbstractModel.php(540): Magento\Catalog\Model\ResourceModel\Product->load(Object(Magento\Catalog\Model\Product\Interceptor), '115', NULL)

#6 /home/web/deployment/flag/releases/8/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\Model\AbstractModel->load('115')

#7 /home/web/deployment/flag/releases/8/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Model\Product\Interceptor->___callParent('load', Array)

#8 /home/web/deployment/flag/releases/8/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Model\Product\Interceptor->Magento\Framework\Interception{closure}('115')

#9 /home/web/deployment/flag/releases/8/generated/code/Magento/Catalog/Model/Product/Interceptor.php(50): Magento\Catalog\Model\Product\Interceptor->___callPlugins('load', Array, Array)

#10 /home/web/deployment/flag/releases/8/vendor/facebook/facebook-for-magento2/Helper/MagentoDataHelper.php(189): Magento\Catalog\Model\Product\Interceptor->load('115')

#11 /home/web/deployment/flag/releases/8/vendor/facebook/facebook-for-magento2/Observer/InitiateCheckout.php(64): Facebook\BusinessExtension\Helper\MagentoDataHelper->getCartContentIds()

#12 /home/web/deployment/flag/releases/8/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Facebook\BusinessExtension\Observer\InitiateCheckout->execute(Object(Magento\Framework\Event\Observer))

#13 /home/web/deployment/flag/releases/8/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Facebook\BusinessExtension\Observer\InitiateCheckout), Object(Magento\Framework\Event\Observer))

#14 /home/web/deployment/flag/releases/8/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))

#15 /home/web/deployment/flag/releases/8/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('facebook_busine...', Array)

#16 /home/web/deployment/flag/releases/8/vendor/facebook/facebook-for-magento2/Block/Pixel/Common.php(152): Magento\Framework\Event\Manager\Proxy->dispatch('facebook_busine...', Array)

#17 /home/web/deployment/flag/releases/8/vendor/facebook/facebook-for-magento2/view/frontend/templates/pixel/initiate_checkout.phtml(5): Facebook\BusinessExtension\Block\Pixel\Common->trackServerEvent('f2b0443b-bc4b-4...')

#18 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/home/web/deplo...')

#19 /home/web/deployment/flag/releases/8/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\TemplateEngine\Php->render(Object(Facebook\BusinessExtension\Block\Pixel\InitiateCheckout), '/home/web/deplo...', Array)

#20 /home/web/deployment/flag/releases/8/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent('render', Array)

#21 /home/web/deployment/flag/releases/8/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception{closure}(Object(Facebook\BusinessExtension\Block\Pixel\InitiateCheckout), '/home/web/deplo...', Array)

#22 /home/web/deployment/flag/releases/8/generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php(23): Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins('render', Array, Array)

#23 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php\Interceptor->render(Object(Facebook\BusinessExtension\Block\Pixel\InitiateCheckout), '/home/web/deplo...', Array)

#24 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Element/Template.php(303): Magento\Framework\View\Element\Template->fetchView('/home/web/deplo...')

#25 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Element/AbstractBlock.php(1111): Magento\Framework\View\Element\Template->_toHtml()

#26 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Element/AbstractBlock.php(1115): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}()

#27 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Element/AbstractBlock.php(675): Magento\Framework\View\Element\AbstractBlock->_loadCache()

#28 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Layout.php(578): Magento\Framework\View\Element\AbstractBlock->toHtml()

#29 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Layout.php(555): Magento\Framework\View\Layout->_renderBlock('fbe.pixel.inita...')

#30 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement('fbe.pixel.inita...')

#31 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement('fbe.pixel.inita...', false)

#32 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('before.body.end', false)

#33 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement('before.body.end')

#34 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement('before.body.end', false)

#35 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('page.wrapper', false)

#36 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')

#37 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement('page.wrapper', false)

#38 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('root', false)

#39 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement('root')

#40 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Layout.php(975): Magento\Framework\View\Layout->renderElement('root')

#41 /home/web/deployment/flag/releases/8/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput()

#42 /home/web/deployment/flag/releases/8/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', Array)

#43 /home/web/deployment/flag/releases/8/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception{closure}()

#44 /home/web/deployment/flag/releases/8/generated/code/Magento/Framework/View/Layout/Interceptor.php(41): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)

#45 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Result/Page.php(258): Magento\Framework\View\Layout\Interceptor->getOutput()

#46 /home/web/deployment/flag/releases/8/vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))

#47 /home/web/deployment/flag/releases/8/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))

#48 /home/web/deployment/flag/releases/8/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)

#49 /home/web/deployment/flag/releases/8/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))

#50 /home/web/deployment/flag/releases/8/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(23): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)

#51 /home/web/deployment/flag/releases/8/vendor/magento/framework/App/Http.php(120): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))

#52 /home/web/deployment/flag/releases/8/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http->launch()

#53 /home/web/deployment/flag/releases/8/pub/index.php(29): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))

#54 {main} [] []

@zlik
Copy link
Contributor

zlik commented Jun 18, 2021

@kanhaiya5590, thank you for preparing this pull request. Looks like you've used the marketplace branch. This branch is actually out of date and is not used. Can you please prepare a new pull request using master? Thanks!

@kanhaiya5590
Copy link
Author

Hi @zlik ,

As i seen https://marketplace.magento.com/facebook-facebook-for-magento2.html last update done on 21 April, 2021

So thought that in github https://github.com/facebookincubator/facebook-for-magento2/tree/marketplace branch and magento market place code in SYNC.

we are facing issue with Magento market place code so thought rising this PR will update Github https://github.com/facebookincubator/facebook-for-magento2/tree/marketplace as well as Magento Market Place https://marketplace.magento.com/facebook-facebook-for-magento2.html

Hope i share my thought, if we can't merge the Github Master branch code to Magento market place FB extension, no issue we can close this PR. Because the code there in Magento Market place same issue which i mention in main comment.

nenriquez and others added 2 commits June 24, 2021 09:30
…?in=20catch=20statement=20when=20module=20try=20to=20push=20new?= =?UTF-8?q?=20category=20=E2=80=A6?= (#62)

Summary:
…to facebook.

![WhatsApp Image 2021-06-22 at 10 50 50](https://user-images.githubusercontent.com/4296223/122944595-57454780-d34e-11eb-9df4-3e8dada3832f.jpeg)

Pull Request resolved: #62

Differential Revision: D29338741

Pulled By: zlik

fbshipit-source-id: 224f5daa
Summary: Pull Request resolved: #46

Differential Revision: D29339447

Pulled By: zlik

fbshipit-source-id: f58479a0
@zlik
Copy link
Contributor

zlik commented Jul 8, 2021

@kanhaiya5590, marketplace branch is not in sync. We should probably remove it. Can you please create a pull request against master? Once submitted and merged into master we can then update the extension code on Magento Marketplace. Thanks!

zlik and others added 2 commits July 27, 2021 15:00
Summary:
Note: this goes into `master` – public version.

Ported changes from the onsite checkout version to remove FB attributes from product grid.

{F631110033}

This is to address [Github issue](#64).

Bumped version to `1.4.3`.

Differential Revision: D29647337

fbshipit-source-id: 64561a9f
Summary:
Admin/menue ACL

Pull Request resolved: #21

Differential Revision: D29643957

Pulled By: zlik

fbshipit-source-id: 6936e051
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.