I just installed the latest dev on my local testsite. (wamp server)
When I add another sitemap I get the following error:
recoverable fatal error: Argument 1 passed to xmlsitemap_sitemap_save() must be an instance of stdClass, array given, called in C:\wamp\www\drupal\sites\all\modules\xmlsitemap\xmlsitemap.admin.inc on line 238 and defined in C:\wamp\www\drupal\sites\all\modules\xmlsitemap\xmlsitemap.module on line 381.
recoverable fatal error: Argument 1 passed to xmlsitemap_sitemap_get_context_hash() must be an array, null given, called in C:\wamp\www\drupal\sites\all\modules\xmlsitemap\xmlsitemap.module on line 386 and defined in C:\wamp\www\drupal\sites\all\modules\xmlsitemap\xmlsitemap.module on line 472.
warning: asort() expects parameter 1 to be array, null given in C:\wamp\www\drupal\sites\all\modules\xmlsitemap\xmlsitemap.module on line 473.
warning: Attempt to assign property of non-object in C:\wamp\www\drupal\sites\all\modules\xmlsitemap\xmlsitemap.module on line 386.
warning: array_fill() [function.array-fill]: Number of elements must be positive in C:\wamp\www\drupal\includes\database.inc on line 253.
warning: implode() [function.implode]: Invalid arguments passed in C:\wamp\www\drupal\includes\database.inc on line 253.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT * FROM xmlsitemap_sitemap WHERE smid IN () in C:\wamp\www\drupal\sites\all\modules\xmlsitemap\xmlsitemap.module on line 343.
Also the default sitemap (the one that is automatically created after installing the module) is deleted.
Now there are no XML sitemaps available.
Then I click "Add new XML sitemap".
Then I choose the desired language. (I have a multilingual site)
I choose English.
Then I get the following error:
Fatal error: Cannot use object of type stdClass as array in C:\wamp\www\drupal\sites\all\modules\xmlsitemap\xmlsitemap.admin.inc on line 232
I enabled following XML sitemap modules:
XML sitemap
XML sitemap internationalization
XML sitemap node
I uninstalled and reinstalled the module(s). Still the same issue.
Comments
Comment #1
Dave ReidMake sure to re-download the latest 6.x-2.x-dev release. This should have been fixed already.
Comment #2
digi24 CreditAttribution: digi24 commentedI have just installed current domain_xmlsitemap and updated to latest xmlsitemap 6.2-dev and I am experiencing exactly the same problem.
Comment #3
Dave ReidMake sure you are using the *same* versions of xmlsitemap and domain_xmlsitemap. Use the beta1 release or the latest dev release, but don't mix them up.
Comment #4
tomsm CreditAttribution: tomsm commentedI have redownloaded the latest dev (2010-Sep-24). I do not use domain_xmlsitemap. Still the same errors.
Core & modules that I use:
drupal 6.19
Internationalization 6.x-1.7
Internationalization views 6.x-3.x-dev (2010-Jul-21)
Views 6.x-3.x-dev (2010-Sep-15)
CCK 6.x-3.x-dev (2010-Aug-26)
I noticed something about the XML sitemap internationalization: When I installed the module the default sitemap has its language set to Default. This sitemap includes items in all languages.
When I try to add a sitemap, I can only select a specific language (in my case: English, French and Dutch), not default. I thought that the default language is the one in which you installed drupal, in my case English. So a sitemap that contains links in all languages should have as language "All" and not "Default". I do not think that this has anything to do with this issue, so maybe I should reopen a new one for this?
Comment #5
digi24 CreditAttribution: digi24 commentedTo reproduce the problem:
1. Unistalled everything.
2. Installed xmlsitemap module and domain_xmlsitemap (both latest dev)
-> Example sitemap ist installed.
3. Tried deleting sitemap -> no buttons show up on confirm page, no deleting possible
4. Changed the default path for sitemap cache
default sitemap still at old path
5. tried adding new sitemap for same domain
sitemap is deleted, it is not possible to add a new sitemap "Cannot use object of type stdClass as array in ..."
Comment #6
Dave ReidThanks for the report back. I double checked and think I found the bug you were encountering. I have committed fixes to CVS on both D7 and D6:
http://drupal.org/cvs?commit=427026
http://drupal.org/cvs?commit=427028
Comment #7
digi24 CreditAttribution: digi24 commentedThanks Dave, the problem with the delete buttons is fixed and there is also a warning about deleting the last sitemap.
However, given the setup without any sitemaps, I still cannot create new ones. The strange thing is inthe following function, where I added a var_dump():
somehow the variable is still an array and the smid is not set:
So I tried changing it to:
and now the smid gets set correctly, however now the FAPI goes crazy:
Fatal error: Cannot use object of type stdClass as array in /var/www/live/includes/form.inc on line 421
Comment #8
digi24 CreditAttribution: digi24 commentedStill not sure about the typecasting (probably wrong, could as well omit the back reference), but found the problem in the if clause:
Comment #9
digi24 CreditAttribution: digi24 commentedOne more addition:
the patch above still was not sufficient, as sitemap creation remains broken (I had a rather large sitemap so it was not obvious), I have added the is_object check and separate typecasting to xml_sitemap_save and now it seems to work better.
I think I identified the problem, would be nice if somebody familiar with the object handling in xmlsitemaps could have a look at it.
Comment #10
digi24 CreditAttribution: digi24 commentedanother correction for the empty statement:
Comment #11
Dave ReidAlright I'm very sure I have this all fixed now. I went through and manually tested sitemap addition, editing, and deletion on both D6 and D7 and they all work with no errors.
Comment #12
tomsm CreditAttribution: tomsm commentedJust installed and tested latest dev (2010-Sep-30). Everything is OK.
Comment #13
Vacilando CreditAttribution: Vacilando commentedMy sitemaps disappeared. When running cron manually, I get "Cron run failed, disabled or nothing to do".
Updated from previous 6.x-2.x-dev to the latest of 2010-Sep-30 and ran /update.php
Unfortunately, I still get
PHP Fatal error: Cannot use object of type stdClass as array in /.............../sites/all/modules/xmlsitemap/xmlsitemap.xmlsitemap.inc
Comment #14
Dave Reid@vacilando: I'm missing the line number from that error message that is the most helpful information.
Comment #15
Vacilando CreditAttribution: Vacilando commentedApologies. It's line 186.
Comment #16
Dave ReidHrm, I can't confirm this. Are you using any sub-modules that integrate with XML sitemap? Try updated to latest development versions for all?
Comment #17
Vacilando CreditAttribution: Vacilando commentedNot sure why, but I am not getting this error anymore.