Last modified: 2013-06-04 14:45:53 UTC
I get "Notice: Array to string conversion in C:\folder\extensions\SemanticMediaWiki\includes\storage\SQLStore\SMW_SQLStore3_Writers.php on line 383" when saving pages (displays at bottom of page), and occasionally also getting "Warning: Cannot modify header information - headers already sent by (output started at C:\folder\extensions\SemanticMediaWiki\includes\storage\SQLStore\SMW_SQLStore3_Writers.php:384) in C:\folder\includes\WebResponse.php on line 38" which breaks the page. On some pages I also get "Warning: json_encode(): recursion detected in C:\inetpub\wikiwhereis.com\live\includes\json\FormatJson.php on line 48" at the top of the page. I can't remember if I started the wiki with 1.8b2 or 1.7, but I know I didn't have the error in 1.8b2. I've tried php SMW_setup.php --delete, and refreshing the data with no use. I think the error may have to do with Semantic forms arrays being saved onto page templates, but that's just a guess.
I believe the FormatJson error may have been in SemanticMaps and fixed with 2.0.1. I will update the bug if I see it again. Other errors are still there, and still breaking page saves.
Please use different bug reports for different bugs. This makes it much easier to keep track of things. The first problem is a duplicate of Bug 42321. You may want to disable PHP notices on the site if you are not using it for PHP development. This bug is also related to the PHP version you are using (older versions don't show this notice). The second problem is a new problem. It might relate to the PHP version, too, but needs investigation. The third problem is triggered in code that belongs to MediaWiki. It needs to be investigated if the cause is in SMW at all. SMW uses objects with "recursive" dependencies (two-way pointers between a parent object and its children). Maybe this could make such issues visible, but I do not know why/when the object in question (SQLStore3) would need to be serialized in JSON. Maybe it is a bug in some other extension, as you suggest.
Sorry, first bug submit, and didn't know if they were all related since they all happened with the change to SMW 1.8 final sqlstore3. I'm currently running Mediawiki 1.20.0, PHP 5.4.0, MySQL 5.1.66-community on a Server 2008r2 IIS box. If any of that helps. Not really worried about the array to string error since I'll turn off debugging when the site goes live. The formatjson error was also mentioned by someone else in the mailing list in the thread about the new Maps 2.0.1, so I wouldn't doubt it was related to that. Still haven't seen the error since the update. The header error on page saves with changes is a show stopper though, since it returns a blank page with errors. One good thing is that the changes are committed even though the submit page breaks. Let me know if there is anything I can do to help.
You can view this error by making a change to the page at http://www.wikiocity.com/Texas/San_Antonio/Post_Offices/Thousand_Oaks_Post_Office . This is a test page, so feel free to edit it however you wish to test the error. Hoping this will be fixed in 1.8.1
Just wanted to update that the errors are still occurring in 1.8.0.2 Notices are no big problem, but the warning below still breaks the page. Warning: Cannot modify header information - headers already sent by (output started at C:\inetpub\wikiocity.com\live\extensions\SemanticMediaWiki\includes\storage\SQLStore\SMW_SQLStore3_Writers.php:383) in C:\inetpub\wikiocity.com\live\includes\WebResponse.php on line 38 Any news someone can give on this? Thanks!
Just turn off the warnings. Put this at the top of your localsettings file: error_reporting(0); ini_set("display_errors", 0); The issue has been fixed on master and will thus be fixed in the 1.9 release.
(In reply to comment #6) > Just turn off the warnings. Put this at the top of your localsettings file: > > error_reporting(0); > ini_set("display_errors", 0); > > The issue has been fixed on master and will thus be fixed in the 1.9 release. Works for me! Thanks!
*** Bug 49025 has been marked as a duplicate of this bug. ***
It would be good if you could tell us where this has been fixed in master so we can use the fix if we're willing to patch our own system.
patch on bug #44027 fixed this for me. *** This bug has been marked as a duplicate of bug 44027 ***