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

1.0.3 Cannot create invoice #2

Open
dvershinin opened this issue Jan 23, 2018 · 4 comments
Open

1.0.3 Cannot create invoice #2

dvershinin opened this issue Jan 23, 2018 · 4 comments

Comments

@dvershinin
Copy link

After installing the plugin at live site, going to Sales -> Orders -> finding an invoice -> View -> click on Invoice at the top produces the error:

Trace: #0 /srv/www/lvguitars.com/vendor/magento/framework/DataObject/Copy/Config/Converter.php(41): Magento\Framework\App\ErrorHandler->handler(8, 'Trying to get p...', '/srv/www/lvguit...', 41, Array)
#1 /srv/www/lvguitars.com/vendor/magento/framework/DataObject/Copy/Config/Converter.php(23): Magento\Framework\DataObject\Copy\Config\Converter->_convertScope(Object(DOMElement))
#2 /srv/www/lvguitars.com/vendor/magento/framework/Config/Reader/Filesystem.php(171): Magento\Framework\DataObject\Copy\Config\Converter->convert(Object(DOMDocument))
#3 /srv/www/lvguitars.com/vendor/magento/framework/Config/Reader/Filesystem.php(130): Magento\Framework\Config\Reader\Filesystem->_readFiles(Object(Magento\Framework\Config\FileIterator))
#4 /srv/www/lvguitars.com/generated/code/Magento/Framework/DataObject/Copy/Config/Reader/Proxy.php(95): Magento\Framework\Config\Reader\Filesystem->read('global')
#5 /srv/www/lvguitars.com/vendor/magento/framework/Config/Data.php(104): Magento\Framework\DataObject\Copy\Config\Reader\Proxy->read()
#6 /srv/www/lvguitars.com/vendor/magento/framework/Config/Data.php(92): Magento\Framework\Config\Data->initData()
#7 /srv/www/lvguitars.com/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\Config\Data->__construct(Object(Magento\Framework\DataObject\Copy\Config\Reader\Proxy), Object(Magento\Framework\App\Cache\Type\Config), 'fieldset_config', NULL)
@kevinecd
Copy link
Contributor

Give this a try and let me know if it works.

Change needs to be made in this core file:

/vendor/magento/framework/DataObject/Copy/Config/Converter.php on line 41

Find line 41 in above file, should look like following code:

 $fieldsetName = $fieldset->attributes->getNamedItem('id')->nodeValue;
 $result[$fieldsetName] = $this->_convertFieldset($fieldset);

Replace those lines with the following:

if($fieldset->attributes->getNamedItem('id')){
     $fieldsetName = $fieldset->attributes->getNamedItem('id')->nodeValue;
     $result[$fieldsetName] = $this->_convertFieldset($fieldset);
}

Let me know if this works for you, once confirmed we can close this ticket and I'll add this to the instructions in the readme.

Thanks!

@dvershinin
Copy link
Author

It works for us now. Have you filed the bug with M2? If so, can you give us a link to the bug entry so we watch it for updates as it's best to avoid core file hacks.

@kevinecd
Copy link
Contributor

I am yet to file the bug, will do so ASAP and link it here. Going to leave this open until we get a resolution from M2 staff.

@Lach1222 Lach1222 mentioned this issue Jan 19, 2019
@nickrfisher87
Copy link

This is a bug with the Reverb extension, not Magento. The cause of it is in the /Reverb/ReverbSync/etc/fieldset.xml file. This file is using Magento 1 code not Magento 2. It looks like this:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:DataObject/etc/fieldset.xsd">
    <scope id="global">
        <fieldsets>
            <sales_convert_quote_item>
                <reverb_item_link>
                    <to_order_item>*</to_order_item>
                </reverb_item_link>
            </sales_convert_quote_item>
        </fieldsets>
    </scope>
</config>

After updating to Magento 2 code it should look like this:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:DataObject/etc/fieldset.xsd">
    <scope id="global">
        <fieldset id="quote_convert_item">
            <field name="reverb_item_link">
                <aspect name="to_order_item" />
            </field>
        </fieldset>
    </scope>
</config>

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

3 participants