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

Any fix for sitemaps? 
 
NathanJ
Member
 
Total Posts:  44
Joined:  2008-04-07
 

Every time I try to manually generate a sitemap, I get this:

WarningInvalid argument supplied for foreach()  in /home/hanwei/public_html/app/code/core/Mage/Sitemap/Model/Sitemap.php on line 80
Trace
:
#0 /home/hanwei/public_html/app/code/core/Mage/Sitemap/Model/Sitemap.php(80): mageCoreErrorHandler(2, 'Invalid argumen...', '/home/hanwei/pu...', 80, Array)
#1 /home/hanwei/public_html/app/code/core/Mage/Adminhtml/controllers/SitemapController.php(206): Mage_Sitemap_Model_Sitemap->generateXml()
#2 /home/hanwei/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(342): Mage_Adminhtml_SitemapController->generateAction()
#3 /home/hanwei/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php(148): Mage_Core_Controller_Varien_Action->dispatch('generate')
#4 /home/hanwei/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(146): Mage_Core_Controller_Varien_Router_Admin->match(Object(Mage_Core_Controller_Request_Http))
#5 /home/hanwei/public_html/app/Mage.php(427): Mage_Core_Controller_Varien_Front->dispatch()
#6 /home/hanwei/public_html/index.php(40): Mage::run()
#7 {main}

I am using - http://www.mysite.com/admin/sitemap/generate/sitemap_id/1

My sitemap directory is set to 777.

What could be causing this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nerf-Herder
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2008-09-19
 

Depends on the setup.  Streight PHP5 or the CGI stuff?  Anyways, shot in the dark here, have you tried 755 instead of 777?

 
Magento Community Magento Community
Magento Community
Magento Community
 
NathanJ
Member
 
Total Posts:  44
Joined:  2008-04-07
 

Thanks for your response -

I know PHP5 is available, though I’m not sure how to check if it’s running in that mode?

Trying 755, Magento still threw up on itself, but the first line was different:
Permission denied for write to /home/hanwei/public_html/sitemap

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nerf-Herder
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2008-09-19
 

Well that would tell me (and my limited experience) that you are running real PHP5.

What version of Magento are you running?

Nerf-

 
Magento Community Magento Community
Magento Community
Magento Community
 
NathanJ
Member
 
Total Posts:  44
Joined:  2008-04-07
 

ver. 1.0.19870.4 - I know that’s outdated, been meaning to upgrade… however, in other threads I’ve seen people using the method I tried to generate a sitemap without this problem, so I’m not sure it’s the version.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nerf-Herder
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2008-09-19
 

I was wondering because your code looks completely different from mine.  I’m new to the Magento thing (in about 5 days now) and didn’t want to advise you based on the code I’m looking without confirming your version.

Short answer… I have no idea.

Sorry about that.  ohh

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