Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix error when using intro and outro text #854

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

YvarRavy
Copy link
Contributor

Fixes issue: #853
i first checked how SMW handels this with broadtable and pretty much just moved this code

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 40.77%. Comparing base (fd72ce3) to head (c29cbf8).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
formats/datatables/DataTables.php 0.00% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #854      +/-   ##
============================================
- Coverage     40.80%   40.77%   -0.04%     
- Complexity     2404     2410       +6     
============================================
  Files            81       81              
  Lines          7850     7856       +6     
============================================
  Hits           3203     3203              
- Misses         4647     4653       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@YvarRavy
Copy link
Contributor Author

could you check this out? @gesinn-it-ilm

@gesinn-it-ilm
Copy link
Contributor

@JeroenDeDauw could you please review this PR? Thanks.

@JeroenDeDauw
Copy link
Member

Costs too many brain cycles. If another dev vouches for this code I am happy to merge

@thomas-topway-it
Copy link
Contributor

I will check it soon on my side, I was also planning to do a few updates to carousel format

@thomas-topway-it
Copy link
Contributor

I'm sorry for the delay. As pointed out here the error shows when Datatables is called from the Special:Ask page and $this->mOptions are not set in the MW Parser (when $this->parser->recursiveTagParseFully is called from the function handleNonFileResult)

Therefore

$isValid = $this->parser->getOptions() && $this->parser->getTitle();

as in SMW\Parser\RecursiveTextProcessor could be checked before using $this->parser->recursiveTagParseFully in order to set Parser's setOptions explicitly, or just to use the original solution (from SMW\Query\ResultPrinters\ResultPrinter) pointed out by you.

(I will merge it, then I will add a comment in the code with instructions to fix the original Datatables solution if needed)

Copy link
Contributor

@thomas-topway-it thomas-topway-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assessment & tested

@JeroenDeDauw JeroenDeDauw merged commit f7cb957 into SemanticMediaWiki:master Nov 3, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants