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

Product Pages - Error
 
avryhof
Jr. Member
 
Total Posts:  11
Joined:  2010-06-03
 

Until two days ago, I had a Magento shop working.  I then installed a security certificate, and now I get the error

addToChildGroup() on a non-object in /home/fiscalin/public_html/shop/app/code/core/Mage/Core/Block/Abstract.php

Here is exactly what I did -
1. Installed the Security Certificate - All non-magento pages on the site load and work without issue.
2. Went into Admin, Chose System->Configuration->Web
3. Set both Secure and Unsecure Base URLs to what they were, but changed http to https
4. Went to System->Index Management and Reindexed everything
5. Went to System->Cache Management and refreshed all of the caches

Now, the index and search pages appear to work (top navigation is missing similar to other similar issues posted here)

I have looked at all of the catalog.xml files, which are the stock files from a fresh install.  I have not changed them, just copied them when I duplicated the default theme for my custom theme.  After duplicating the default theme, I made most of my changes just in the CSS.

Since doing this, I have tried changing the settings back, reindexing, refreshing the cache, and uploading a few modified versions of catalog.xml.

I have also done a little fiddling with Abstract.php

Adding: echo var_dump($this->getParentBlock()); above $this->getParentBlock()->addToChildGroup($groupName, $this); returns NULL, so the parent block of what is trying to be added is NULL (producing the referred \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Non Object\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\")

Adding: echo $groupName; above $this->getParentBlock()->addToChildGroup($groupName, $this); returns detailed_info.

What this looks like is happening is it\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s trying to load the detailed_info of one of the two blocke specified in catalog.xml into a block, but can\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’t address the block.

I don\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’t know enough about how the whole thing works to figure out exactly what is going on and solve it, but hopefully someone here will.

I\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’m going to try a few other things (like switching to the default theme) but so far haven\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’t had much luck.

It\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s just depressing that so many configuration changes (even in the admin) cause Magento to break.

I wish there was something else that offered the features my customer wants that wasn\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’t so complex and unstable.

 
Magento Community Magento Community
Magento Community
Magento Community
 
NeilA
Moderator
 
Avatar
Total Posts:  1372
Joined:  2007-09-17
Blue Mountains, Oz
 

Just checking something very obvious:

You say:

3. Set both Secure and Unsecure Base URLs to what they were, but changed http to https

But I assume you mean you set the secure base URL to https, but left the unsecure at http - that right?

Regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
avryhof
Jr. Member
 
Total Posts:  11
Joined:  2010-06-03
 
NeilA - 08 February 2011 07:21 PM

Just checking something very obvious:

You say:

3. Set both Secure and Unsecure Base URLs to what they were, but changed http to https

But I assume you mean you set the secure base URL to https, but left the unsecure at http - that right?

Regards

I had originally set both to https, since I had installed the Certificate for the whole domain, and figured forcing secure wouldn’t hurt.

I have since, switched them back so Secure is https, and Unsecure is http. After Reindexing and Refreshing the cache, all of the product pages still go to the error mentioned above.

 
Magento Community Magento Community
Magento Community
Magento Community
 
avryhof
Jr. Member
 
Total Posts:  11
Joined:  2010-06-03
 

I’m not sure why it didn’t work before, but I just went back and applied the changes again, and the product pages now come up.

I also removed all of my testing code from Abstract.php and it is still working.

In doing my tests though, I’m wondering where the Secure Base URL comes in? I wonder this because the shop used the Authorize.NET AIM checkout method, but at the checkout pages, Magento doesn’t seem to be going in to secure mode.

Is there somewhere in configuration that I should be doing this, or should I be accessing the shop via https or something?

I only ask because I don’t want transactions going through Non-SSL connections.

 
Magento Community Magento Community
Magento Community
Magento Community
 
avryhof
Jr. Member
 
Total Posts:  11
Joined:  2010-06-03
 

I got the Secure URLs working.  I would have edited it out of the other post, but the forum doesn’t seem to like saving my edits, and keeps rejecting the Captcha, even though I know what I’m entering is correct.

 
Magento Community Magento Community
Magento Community
Magento Community
 
NeilA
Moderator
 
Avatar
Total Posts:  1372
Joined:  2007-09-17
Blue Mountains, Oz
 

Yep, the forum software is badly broken at the moment… :(

I have no idea how authorize.net works, but the secure base URL comes in when the customer registers, or accesses their account, and at the checkout - in other words, whenever sensitive data is involved.
There is no point at all in having the whole site run under https because it just slows everything down.

I suspect the change in behaviour you saw was related to the cache - if you didn’t clear it after your edits.

So just to be clear:  the secure URL should be the same as the unsecure except for the ‘s’ wink

Regards

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