segment-boneyard / analytics-magento

[DEPRECATED] The hassle-free way to integrate analytics into any Magento store.
15 stars 19 forks source link

"Undefined index: entity_id" error is thrown when customer logs out #80

Open ryanmcdonnell opened 8 years ago

ryanmcdonnell commented 8 years ago

Stack trace points to line 23 of app/code/community/Segment/Analytics/Model/Controller/Customerloggedout.php

Does the block even need a userId set? Since the customer logged out, wouldn't the userId be non-existent?

sperand-io commented 8 years ago

Thanks for reporting — this doesn't happen in my test store, but I can see it being an issue.

We do want to attribute the log out action to the customer, which I imagine was my initial motivation for including the userId. But you're right; we don't need it inside of this block, since analytics.js will attach the userId to the track call automatically.

ryanmcdonnell commented 8 years ago

"Undefined index" exceptions fall under E_NOTICE which is commonly filtered out in many PHP configurations.