Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Comparable Attributes aren’t working correctly - missing values
 
hcpunk
Jr. Member
 
Total Posts:  24
Joined:  2009-04-06
 

When I was comparing some products I noticed that the short_description attribute wasn’t being displayed. I checked the attribute configuration in the admin and “Comparable on Front-end” was set to “Yes”. I did some digging through the core classes and played with some simple data dumping to check what was happening. To me it looks like some of the attributes being evaluated in the comparison code are missing their required values (see attached screen-shot, the fields are attributeCode, frontEndLabel, and isComparable).

I’ve tried re-saving the affected attributes but it doesn’t seem to have any effect. Neither does clearing the caches. I’m at my wit’s end trying to figure out what could be happening and any help would be appreciated immensely.

Image Attachments
comparable.gif
 
Magento Community Magento Community
Magento Community
Magento Community
 
hcpunk
Jr. Member
 
Total Posts:  24
Joined:  2009-04-06
 

Okay, so I’ve done a lot more digging around, and there is definitely something up with the attribute object methods. Very low-level methods aren’t returning the correct data from the “eav_attribute” table, specifically the following:

- getIsVisible()
- getIsComparable

Instead of returning the expected values from the database they are coming back blank (or null, if you prefer).

This is driving me crazy because I’ve checked the admin and the database and the attribute options are set correctly. The fault seems to exist in the methods that are called on the comparison page. How could this even occur? Bad upgrade/install? Everything else on the site is working just great.

Anyone else having comparison problems with ver.1.3?

 
Magento Community Magento Community
Magento Community
Magento Community
 
hcpunk
Jr. Member
 
Total Posts:  24
Joined:  2009-04-06
 

Problem solved, but it required core file modification. Bug reported here:

http://www.magentocommerce.com/bug-tracking/issue?issue=6051

I found that if I disabled part of the “getAttribute” method within the EAV/config helper/singleton I could get the Attributes to load all their data correctly from the database. That helper was checking the cache and if any of the Attributes had been previously loaded it would use them instead of querying the DB. It seemed, however, that some of that cached Attributes had incomplete data sets. I didn’t bother tracking down where the bad caching was happening, I thought that I might leave that to the Magento team since I have already wasted days on this issue smile

Check my bug report if you want more details.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top