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

Associated product in admin not visible #3066

Closed
matteotestoni opened this issue Mar 6, 2023 · 27 comments · Fixed by #3093
Closed

Associated product in admin not visible #3066

matteotestoni opened this issue Mar 6, 2023 · 27 comments · Fixed by #3093

Comments

@matteotestoni
Copy link

Preconditions (*)

  1. OpenMage 19.5.0 rc1

Steps to reproduce (*)

  1. open a configurable product with associated product in backend

Expected result (*)

  1. ajax action and load associated product

Actual result (*)

  1. ajax loading but admin empty
@ADDISON74
Copy link
Contributor

What do you mean by "admin empty"? Most likely you wanted to say that there are no associated products in the grid. Basically, although the configurable product has associated products they are not displayed.

I tried to reproduce this issue with the latest OpenMage 19 version cloned from this repository and Magento Sample Pack. All configurable products have associated products. Then I created a configurable product and attached simple products, again the editing of the product displays the associated products in the grid.

Are you using OpenMage V19.5 installed from scratch or a custom version with extensions?

@matteotestoni
Copy link
Author

image

@matteotestoni
Copy link
Author

On inserting product all ok. But when i edit there is an error. I am debugging but by now i cannot understand.
I migrated to openmage 20.1 rc1

@matteotestoni
Copy link
Author

matteotestoni commented Mar 6, 2023

as soon i enter in editing i have this log
Mage_Eav_Exception: Invalid attribute requested: simple_product_color in /app/Mage.php:645
but in eav_attribute simple_product_color is not present

@fballiano
Copy link
Contributor

I think it's already solved in #3038

@matteotestoni
Copy link
Author

don't work. redis flushed, cache disabled.
Maybe, where to search for Invalid attribute requested: simple_product_color? in database? in files?

@ADDISON74
Copy link
Contributor

ADDISON74 commented Mar 6, 2023

I confirm this bug with an earlier version of OpenMage v19. I didn't spend time to debug and I installed the last version the other days. The issue is gone.

@fballiano
Copy link
Contributor

The problem is here bad6244#r104605921

Let's wait for @luigifab to see if he has an idea on how to fix it

@luigifab
Copy link
Contributor

luigifab commented Mar 15, 2023

For me I haven't any problem with Associated products tab of configurable products:

  • with current 20.1.0-rc2, with my simple fix - PHP 8.0 & 8.2
  • with previous stable versions 20.0.20, 20.0.19, 20.0.18... - PHP 8.0 (yes I use PR 2715 since 2021)

I can create and edit product.
Same on branch 1.9.4.x (commit 1e8fcd0).

@fballiano
Copy link
Contributor

fballiano commented Mar 15, 2023

@luigifab I don't see previously associated products, and I can see that on this line products_related was null and it's now an empty array, this makes line check fails every time (because that variable is now always an array).

@luigifab
Copy link
Contributor

luigifab commented Mar 15, 2023

Yes, but I don't really see the problem for now (in backend).
When I edit my configurable product, all seems to work (for me).

Old product already saved:
image

New product freshly created and saved:
image


I updated my GIT to 0e1c578, still working.
I can see simple products of other configurable products, but perhaps this was like this since the beginning of the time.

image

@fballiano
Copy link
Contributor

it seems not to work for GROUPED products, configurable seems to be ok for me, that's the incriminated line:

Screenshot 2023-03-15 alle 23 02 54

@matteotestoni
Copy link
Author

matteotestoni commented Mar 16, 2023

now i test this changes.. #3093

@matteotestoni
Copy link
Author

matteotestoni commented Mar 16, 2023

nothing. Don't work. With latests OpenMage 19.5.0-rc2 i have another error with mirasvit rma

2730023#0: *2516725 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'Zend_Acl' not found in app/code/core/Mage/Admin/Model/Acl.php:34
Stack trace:
#0 lib/Varien/Autoload.php(64): include()
#1 [internal function]: Varien_Autoload->autoload('Mage_Admin_Mode...')
#2 [internal function]: spl_autoload_call('Mage_Admin_Mode...')
#3 app/code/core/Mage/Core/Model/Session/Abstract/Varien.php(152): session_start()
#4 app/code/core/Mage/Core/Model/Session/Abstract/Varien.php(258): Mage_Core_Model_Session_Abstract_Varien->start('adminhtml')
#5 app/code/core/Mage/Core/Model/Session/Abstract.php(86): Mage_Core_Model_Session_Abstract_Varien->init('core', 'adminhtml')
#6 /var/www/vhosts/artigrafichemac" while reading response header from upstream

@elidrissidev
Copy link
Member

"PHP message: PHP Fatal error: Uncaught Error: Class 'Zend_Acl' not found in app/code/core/Mage/Admin/Model/Acl.php:34

Did you install composer dependencies?

@matteotestoni
Copy link
Author

matteotestoni commented Mar 16, 2023

  1. rm -rf app/code/core/Zend lib/Cm lib/Credis lib/mcryptcompat lib/Pelago lib/phpseclib lib/Zend
  2. download openmage-v19.5.0-rc2.zip)
  3. uploaded all files

@fballiano
Copy link
Contributor

I'll check if there's a problem with the release zip file, although it's not releted with this issue

@matteotestoni
Copy link
Author

i can send you access to development area of the site with errors like ftp or ssh

@matteotestoni
Copy link
Author

matteotestoni commented Mar 16, 2023

The problem is here. simple_product_color but i don't find where this attribute is...

2023-03-16T11:46:08+00:00 ERR (3): 
Mage_Eav_Exception: Nome attributo non valido: simple_product_color in /app/Mage.php:645
Stack trace:
#0 /app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1316): Mage::exception('Mage_Eav', 'Nome attributo ...')
#1 /app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1410): Mage_Eav_Model_Entity_Collection_Abstract->_addAttributeJoin('simple_product_...', 'inner')
#2 /app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(318): Mage_Eav_Model_Entity_Collection_Abstract->_getAttributeConditionSql('simple_product_...', Array, 'inner')
#3 /app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php(1417): Mage_Eav_Model_Entity_Collection_Abstract->addAttributeToFilter('simple_product_...', Array, 'inner')
#4 /app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid.php(145): Mage_Catalog_Model_Resource_Product_Collection->addAttributeToFilter('simple_product_...', Array)
#5 /app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(708): Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Grid->_prepareCollection()
#6 /app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(719): Mage_Adminhtml_Block_Widget_Grid->_prepareGrid()
#7 /app/code/core/Mage/Core/Block/Abstract.php(932): Mage_Adminhtml_Block_Widget_Grid->_beforeToHtml()
#8 /app/code/core/Mage/Core/Block/Abstract.php(650): Mage_Core_Block_Abstract->toHtml()
#9 /app/code/core/Mage/Core/Block/Abstract.php(594): Mage_Core_Block_Abstract->_getChildHtml('grid', true)
#10 /app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php(227): Mage_Core_Block_Abstract->getChildHtml('grid')
#11 /app/design/adminhtml/default/default/template/catalog/product/edit/super/config.phtml(134): Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config->getGridHtml()
#12 /app/code/core/Mage/Core/Block/Template.php(257): include('/var/www/vhosts...')
#13 /app/code/core/Mage/Core/Block/Template.php(294): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#14 /app/code/core/Mage/Core/Block/Template.php(307): Mage_Core_Block_Template->renderView()
#15 /app/code/core/Mage/Adminhtml/Block/Template.php(74): Mage_Core_Block_Template->_toHtml()
#16 /app/code/core/Mage/Core/Block/Abstract.php(933): Mage_Adminhtml_Block_Template->_toHtml()
#17 /app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php(399): Mage_Core_Block_Abstract->toHtml()
#18 /app/design/adminhtml/default/default/template/widget/tabs.phtml(38): Mage_Adminhtml_Block_Widget_Tabs->getTabContent(Object(Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config))
#19 /app/code/core/Mage/Core/Block/Template.php(257): include('/var/www/vhosts...')
#20 /app/code/core/Mage/Core/Block/Template.php(294): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#21 /app/code/core/Mage/Core/Block/Template.php(307): Mage_Core_Block_Template->renderView()
#22 /app/code/core/Mage/Adminhtml/Block/Template.php(74): Mage_Core_Block_Template->_toHtml()
#23 /app/code/core/Mage/Core/Block/Abstract.php(933): Mage_Adminhtml_Block_Template->_toHtml()
#24 /app/code/core/Mage/Core/Block/Text/List.php(42): Mage_Core_Block_Abstract->toHtml()
#25 /app/code/core/Mage/Core/Block/Abstract.php(933): Mage_Core_Block_Text_List->_toHtml()
#26 /app/code/core/Mage/Core/Block/Abstract.php(650): Mage_Core_Block_Abstract->toHtml()
#27 /app/code/core/Mage/Core/Block/Abstract.php(594): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#28 /app/design/adminhtml/default/default/template/page.phtml(53): Mage_Core_Block_Abstract->getChildHtml('left')
#29 /app/code/core/Mage/Core/Block/Template.php(257): include('/var/www/vhosts...')
#30 /app/code/core/Mage/Core/Block/Template.php(294): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#31 /app/code/core/Mage/Core/Block/Template.php(307): Mage_Core_Block_Template->renderView()
#32 /app/code/core/Mage/Adminhtml/Block/Template.php(74): Mage_Core_Block_Template->_toHtml()
#33 /app/code/core/Mage/Core/Block/Abstract.php(933): Mage_Adminhtml_Block_Template->_toHtml()
#34 /app/code/core/Mage/Core/Model/Layout.php(580): Mage_Core_Block_Abstract->toHtml()
#35 /app/code/core/Mage/Core/Controller/Varien/Action.php(397): Mage_Core_Model_Layout->getOutput()
#36 /app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(291): Mage_Core_Controller_Varien_Action->renderLayout()
#37 /app/code/core/Mage/Core/Controller/Varien/Action.php(428): Mage_Adminhtml_Catalog_ProductController->editAction()
#38 /app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(262): Mage_Core_Controller_Varien_Action->dispatch('edit')
#39 /app/code/core/Mage/Core/Controller/Varien/Front.php(188): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#40 /app/code/core/Mage/Core/Model/App.php(371): Mage_Core_Controller_Varien_Front->dispatch()
#41 /app/Mage.php(748): Mage_Core_Model_App->run(Array)
#42 /index.php(61): Mage::run('', 'store')
#43 {main}

@matteotestoni
Copy link
Author

matteotestoni commented Mar 16, 2023

with this configuration work
image

this don't work
image

with apply to all products works

@fballiano
Copy link
Contributor

ma

  1. rm -rf app/code/core/Zend lib/Cm lib/Credis lib/mcryptcompat lib/Pelago lib/phpseclib lib/Zend
  2. download openmage-v19.5.0-rc2.zip)
  3. uploaded all files

I tested the rc2 release file and it works fine for me, anyway it would be another topic different from this one.

@fballiano
Copy link
Contributor

with this configuration work image

this don't work image

with apply to all products works

could you try me patch? because it solves the problem for my customer...

@matteotestoni
Copy link
Author

no code needed. Only change settings in attribute

@fballiano
Copy link
Contributor

it has to work without changing the attribute

@matteotestoni
Copy link
Author

it has to work without changing the attribute

I think the same. But by now i resolved the problem for my customer and give you a way to test.

@matteotestoni
Copy link
Author

matteotestoni commented Mar 16, 2023

next to resolve, mirasvit rma with OpenMage 19.5, Maybe in website of openmage can be usefull to document extension for magento 1 and changes to work with openmage. I contacted amasty, mageworx but they don't update extension...

@luigifab
Copy link
Contributor

I'm lost, but for the error Mage_Eav_Exception: Nome attributo non valido: simple_product_color in /app/Mage.php:645 or Mage_Eav_Exception: Invalid attribute requested: simple_product_color, it's normally fixed by #3038 and included in v20.1.0-rc2.

You (and us) have this error because somewhere, a PHP file use an inexistant attribute.
But now this is not important.

Don't forget to clear the cache!

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

Successfully merging a pull request may close this issue.

5 participants