Closed (fixed)
Project:
XML sitemap
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Jan 2012 at 11:23 UTC
Updated:
12 Dec 2018 at 18:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
trante commentedAny comments?
Comment #2
trante commentedDoes anyone know how can i debug or remove this error on xmlsitemap_generate_chunk method usage?
Comment #3
Anonymous (not verified) commentedLine 169 of xmlsitemap.generate.inc is
So this is telling me that $link['language'] isn't a valid object but should be. Some module other than xmlsitemap is causing this or perhaps you've something defined incorrectly with regard to 'locale'. The easiest method I've found to debug these is to temporarily modify the above to:
This will give you a back trace to which should give you a clue.
Comment #4
Anonymous (not verified) commentedThe real problem with this is that $link['language'] can never be an object. Its value is the varchar value from the database. The attached patch resolves this issue.
Comment #6
Anonymous (not verified) commentedThe patch isn't quite right. The error only happens if the language is set to LANGUAGE_NONE. Further development to resolve this issue is occurring.
Comment #7
Anonymous (not verified) commentedI'm thinking that this issue is resolved by #1593508: The value of 'language' when the value is LANGUAGE_NONE. Please test it a let me know if it resolves the issue.
Comment #8
2phaThe patch linked to above fixed the issue for me
Comment #9
chromix commentedHere's an updated patch. Seems to have quieted down the logs, which is good. Hopefully this one passes.
Comment #10
gratefulsk commentedThanks Chromix. Your patch fixed these errors for me.
Comment #11
Grayside commentedComment #12
agerson commentedThis works for me as well.
Comment #13
andrei.dincu commentedWorks fine for me also.
Good job chromix.
Comment #14
andrei.dincu commentedComment #15
jasom commentedError disappeared thanks to patch in #9.
Comment #16
marcoka commentedalso have that notice galore in my logs. #9 seems to fix. will report back if i discover problems.
Comment #17
scareyclott commentedHi,
I am using Version 7.x-2.3 and getting the same error but about line 188
Notice: Trying to get property of non-object in xmlsitemap_generate_chunk() (line 188I guess it is the same issue as a look at the line shows it talks about Language. I am not a coder is it possible for someone to re jig the Patch for Version 7.x-2.3
Regards Scott
Comment #18
aralnoth commentedI have the same issue in 8.x version. I tested the patch in #9, making the necessary changes to adapt it to the drupal 8 code, and works properly.
Comment #19
devad commented#9 patch re-roll for latest .dev
Some reviews would be nice and if it is becomes RTBC again... commit would be nice as well before new re-roll is needed.
Comment #20
pifagor commentedlook good
Comment #21
devad commentedComment #22
alex_optim+1
Comment #23
pifagor commentedComment #25
pifagor commentedComment #26
marco-sUnfortunately, this modification generates another issue. With this change, the language value in the URL is missing because the url() function expects an object for the language (see: includes/common.inc:2311). We have to convert the value to an object, not the object to string.
This patch is based on the current dev version (dev-2.x e47457f).
Comment #27
apugacescu commentedFaced the same issue marco-s noticed. Given this issue already has committed code opened a new issue as a follow up. https://www.drupal.org/project/xmlsitemap/issues/2987673
marco-s there is no need to convert value to object, language object is already there before the code from this issue patch is executed so the line that rewrites the object by language code should be removed and the code below needs to be adjusted.
Comment #28
pifagor commentedFixed here - https://www.drupal.org/project/xmlsitemap/issues/2987673
Comment #30
vbard commentedJust saw this in Drupal dblog with latest dev:
Notice: Trying to get property of non-object в функции xmlsitemap_generate_chunk() (строка 213 в файле /home/admin/web/mydomain/public_html/sites/all/modules/xmlsitemap/xmlsitemap.generate.inc).