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

Argument 6 missing in SaveImageInformation #31167

Open
anvanza opened this issue Dec 4, 2020 · 14 comments
Open

Argument 6 missing in SaveImageInformation #31167

anvanza opened this issue Dec 4, 2020 · 14 comments
Assignees
Labels
Area: Import / export Component: Image Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: ready for confirmation Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.

Comments

@anvanza
Copy link

anvanza commented Dec 4, 2020

Preconditions (*)

  1. Magento 2.4.1 with PHP 7.4

Steps to reproduce (*)

  1. Use module (Firebear import) to import images with the command line

Expected result (*)

  1. Images are imported

Actual result (*)

Type Error occurred when creating object: Magento\MediaGalleryIntegration\Plugin\SaveImageInformation, Argument 6 passed to Magento\MediaGalleryIntegration\Plugin\SaveImageInformation::__construct() must be of the type array, null given, called in /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121

Cause

#29399

Solution

The imageExtensions argument is defined in the Magento/MediaGalleryIntegration/etc/adminhtml/di.xml file while the SaveImageInformation class could also be used in CLI. Therefore the imageExtensions argument should be moved to Magento/MediaGalleryIntegration/etc/di.xml (without the adminhtml)

CC @firebearstudio

@m2-assistant
Copy link

m2-assistant bot commented Dec 4, 2020

Hi @anvanza. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@ihor-sviziev
Copy link
Contributor

Hi @anvanza,
Could you create a Pull Request with your suggested changes?

@ihor-sviziev ihor-sviziev added the Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. label Dec 4, 2020
JosephMaxwell added a commit to JosephMaxwell/magento2 that referenced this issue Dec 14, 2020
@m2-community-project m2-community-project bot added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Dec 15, 2020
@sidolov sidolov removed this from Ready for Confirmation in Issue Confirmation and Triage Board Dec 15, 2020
@sidolov sidolov added this to Pull Request In Progress in High Priority Backlog Dec 15, 2020
@engcom-Hotel engcom-Hotel self-assigned this Dec 17, 2020
@m2-assistant
Copy link

m2-assistant bot commented Dec 17, 2020

Hi @engcom-Hotel. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@PascalBrouwers
Copy link
Contributor

Confirmed bug and tested PR. PR fixes the issue (import image via cli).
Tested with PHP 7.4 and Magento 2.4.0

@ihor-sviziev
Copy link
Contributor

@PascalBrouwers @anvanza, could you provide some example of how exactly we can reproduce the issue?
The suggested test in the PR #31282 looks really strange. You shouldn't call plugin methods directly.

@engcom-Lima engcom-Lima added Reported on 2.4.x Indicates original Magento version for the Issue report. Component: Image Area: Import / export Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Aug 25, 2021
@github-jira-sync-bot
Copy link

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

@github-jira-sync-bot github-jira-sync-bot removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Aug 25, 2021
@engcom-Lima engcom-Lima added Area: Import / export Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch and removed Reported on 2.4.x Indicates original Magento version for the Issue report. Area: Import / export labels Aug 25, 2021
@engcom-Lima engcom-Lima added the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Aug 25, 2021
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.magento.com/browse/AC-993 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Aug 25, 2021

✅ Confirmed by @engcom-Lima. Thank you for verifying the issue.
Issue Available: @engcom-Lima, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@github-jira-sync-bot
Copy link

❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.magento.com/browse/AC-993

1 similar comment
@github-jira-sync-bot
Copy link

❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.magento.com/browse/AC-993

@m2-community-project m2-community-project bot moved this from Dev In Progress to Ready for Development in High Priority Backlog Aug 25, 2021
@alitopaloglu
Copy link

I can reproduce this on v2.4.3-p2

@pmonosolo
Copy link

I can also reproduce on 2.4.3, but with a custom plugin that was built in-house.

Same thing - when importing products using cron job - no problem. When using CLI command throws errors.

Interestingly, if you extend the class that does the import, it throws error. If you just use ObjectManager (yes I know), it does not throw these errors.

@pmonosolo
Copy link

pmonosolo commented Jul 15, 2022

@anvanza Are you saying just throwing di.xml into src\vendor\magento\module-media-gallery-integration\etc\di.xml with

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\MediaGalleryIntegration\Plugin\SaveImageInformation">
        <arguments>
            <argument name="imageExtensions" xsi:type="array">
                <item name="jpg" xsi:type="string">jpg</item>
                <item name="jpeg" xsi:type="string">jpeg</item>
                <item name="gif" xsi:type="string">gif</item>
                <item name="png" xsi:type="string">png</item>
            </argument>
        </arguments>
    </type>
</config>

will work?

UPDATE: yes it did.

There is a commit to fix this issue:
88d2e4f

But it looks like some heavy rebuild instead of just adding new file to /etc folder.

I think there might be some additional issues with the import after that (mine appears to be super slow compared to a cronjob). And thats why that import rebuild was so heavy-handed.

@leonhelmus
Copy link

This fixed my import issue thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Import / export Component: Image Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: ready for confirmation Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
High Priority Backlog
  
Ready for Development
Development

Successfully merging a pull request may close this issue.

10 participants