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

datatype date / error message duplicated #1074

Closed
kghbln opened this issue Jun 25, 2015 · 3 comments
Closed

datatype date / error message duplicated #1074

kghbln opened this issue Jun 25, 2015 · 3 comments
Labels
bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error
Milestone

Comments

@kghbln
Copy link
Member

kghbln commented Jun 25, 2015

If an improper value for this datatype is stored the error message gets duplicated. See smw.o page on this datatype for an example.

@kghbln kghbln added the bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error label Jun 25, 2015
@mwjames
Copy link
Contributor

mwjames commented Jun 25, 2015

The problem is that the _dat type returns an error text in getShortWikiText [0] on the occasion of a not valid value, the InTextAnnotationParser [1] explicitly ask for $dataValue->getErrorText() when encountered an error creating an odd situation where the error message is displayed twice.

PS: It is an old issue.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/includes/datavalues/SMW_DV_Time.php#L607-L613

[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/src/InTextAnnotationParser.php#L307-L314

@mwjames
Copy link
Contributor

mwjames commented Jun 26, 2015

Addressed with #1075

@mwjames mwjames closed this as completed Jun 26, 2015
@kghbln
Copy link
Member Author

kghbln commented Jun 27, 2015

PS: It is an old issue.

Indeed and I always forgot to open an issue for this. :| My field test for the fix worked perfect. Thanks!

@kghbln kghbln added this to the SMW 2.3 milestone Jun 27, 2015
mwjames added a commit that referenced this issue Jun 28, 2015
Additional error formatting rules for ":", #1066 + #1074
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error
Projects
None yet
Development

No branches or pull requests

2 participants