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

1368 error fix #1369

Merged
merged 2 commits into from Aug 9, 2022
Merged

1368 error fix #1369

merged 2 commits into from Aug 9, 2022

Conversation

TobiasNx
Copy link
Contributor

@TobiasNx TobiasNx commented Aug 9, 2022

The error was due to the buggy behavior that replace_all with alterations demands multiple matching path otherwise it breaks.
See. metafacture/metafacture-fix#249

Fixes #1368.

It seems that alterations in path for `replace_all` automatically expects multiple matches in a record.
See: metafacture/metafacture-fix#249

Therefore I splitted the `replace_all` functions and created a function for each alteration.
@TobiasNx TobiasNx requested a review from dr0i August 9, 2022 12:27
@TobiasNx TobiasNx added the ALMA label Aug 9, 2022
@dr0i dr0i merged commit 8dfcfc9 into master Aug 9, 2022
@dr0i dr0i deleted the 1368-errorFix branch August 9, 2022 14:12
@@ -29,9 +29,12 @@ set_array("describedBy.type[]", "BibliographicDescription")
# <call-macro name="simplify-date" dname="dateModified" dsource="MNG .d"/>
copy_field("MNG .b","describedBy.dateCreated")
copy_field("MNG .d","describedBy.dateModified")
replace_all("describedBy.dateCreated|dateModified","-","")
replace_all("describedBy.dateCreated|dateModified"," .*","")
replace_all("describedBy.dateCreated|dateModified","c|©|\\s?|,|.|:|;|/|=","")
Copy link
Member

Choose a reason for hiding this comment

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

Any other potential bugs notwithstanding, I would strongly advise against relying on this wrong behaviour in the current Metafix implementation! See metafacture/metafacture-fix#143.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FixExecutionException: Expected Array or Hash, got String
3 participants