-
Notifications
You must be signed in to change notification settings - Fork 42
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
EDTF Validation issue #321
Comments
We should leave this open until we confirm how Workbench is validating the value. I know there was talk about validating using the professional wiki EDTF library before pushing to Islandora, so we should confirm where the validation is happening first. |
This is a workbench validation issue. See where it checks dates on an interval and the single_date validation. |
I'll implement https://pypi.org/project/edtf/ now, jumping the priorities queue, since doing so should only take a small amount of time. However, using this simple scrpt: from edtf import parse_edtf
from edtf.parser.edtf_exceptions import EDTFParseException
try:
parse_edtf("193X/196X")
print("Parsed")
except EDTFParseException as e:
print(e)
|
That value isn't validating with the referenced pypi EDTF library because is using the older draft version of the EDTF spec (2012) rather than the finalized (2019) version. |
Wait a second.... their documentation is showing examples of both the older and the newer spec.... 🤔 but the error seems to indicate it is looking the 'u' unspecified indicator (used by the older spec) instead of 'X' (used by the newer one). |
So this is a mea culpa, I recommended this edtf library in the first place without realizing it was for the older spec. 🤦♂️ It looks like there is another edtf validator that could work. |
@seth-shaw-unlv OK, thanks for pointing that one out. The other library validates that date range, so I'll use it. Too bad it doesn't provide details around invalid dates. |
@Natkeeran @dara2 can you test the issue-264 branch? After checking out that branch, you will need to run |
I've merged this code into the @Natkeeran OK to close this issue? |
@mjordan @seth-shaw-unlv, when entering the value and saving it via UI, throws the following error: |
On the islandora/documentation ticket I mention that you have to adjust the FieldWidget settings to permit intervals. I just confirmed that it works on Islandora itself: |
@seth-shaw-unlv I'm going to add this to Workbench's Troubleshooting section, if you're OK with that. |
@seth-shaw-unlv |
I've added the following entry to the Workbench Troubleshooting page: https://mjordan.github.io/islandora_workbench_docs/troubleshooting/#edtf-interval-values-are-not-rendering-in-islandora-properly If this is sufficient, @Natkeeran can we close this issue? |
@mjordan |
193X/196X is a valid EDTF date according to https://digital2.library.unt.edu/edtf/. However, workbench says this is not valid. Not sure if this is an issue with how EDTF is supported in islandora or how it gets validated in workbench!
Created an issue here. Pls close this one.
The text was updated successfully, but these errors were encountered: