SemanticMediaWiki / SemanticResultFormats

Provides additional visualizations (result formats) for Semantic MediaWiki
https://www.semantic-mediawiki.org/wiki/Extension:Semantic_Result_Formats
Other
45 stars 75 forks source link

SRF_Calendar.php: Call to undefined method Parser::disableCache() #654

Closed Megajoul closed 2 years ago

Megajoul commented 3 years ago

Setup

Issue

A request in calendar format results in the following error: Error from line 327 of /var/www/mediawiki/extensions/SemanticResultFormats/formats/calendar/SRF_Calendar.php: Call to undefined method Parser::disableCache()

Bug solved by replacing $parser->disableCache();with $parser->getOutput()->updateCacheExpiry(0); line 327 in extensions/SemanticResultFormats/formats/calendar/SRF_Calendar.php

Three types of warnings are then displayed:

  1. Notice: Array to string conversion in extensions/SemanticResultFormats/formats/calendar/SRF_Calendar.php on line 372
  2. Notice: Array to string conversion in extensions/SemanticResultFormats/formats/calendar/SRF_Calendar.php on line 374
  3. Warning: Cannot modify header information - headers already sent by (output started at extensions/SemanticResultFormats/formats/calendar/SRF_Calendar.php:374) in includes/WebResponse.php on line 74

Steps to reproduce the observation (recommendation is to use the sandbox): Example of calendar request not found in sandbox

kghbln commented 3 years ago

Thanks for reporting!

krabina commented 3 years ago

Same problem here. Ran into this when running rebuildData.php. MW 1.35.2,

kghbln commented 2 years ago

I guess this was fixed with the referenced commit.