-
Notifications
You must be signed in to change notification settings - Fork 9
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
ISSUE-236: Citation Formatter check for null #238
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a stupid Views issue, not us. When loading a formatter for a Field in a Views, the Views opens an Ajax Windows that calls the validation of the Settings form before even displaying. At that moment the $value is NULL and you can't load an entity with a NULL value. This small checks on nulls/elseif deals with it. Also multiple entities should work now (but i have no use for that right now) Only issue is it will actually mark the field as "incomplete" but i don't see a way around this at all bc validation should not be called on Form render. Stupid views.
…ng in citation formatter into try block to check for NULL.
Albert. Can you remove that typo/fix from this pull? I opened a new one for that (since you opened a new issue I feel that is cleaner, and it also only applies to 1.1.0, while this pull needs to go into 1.1.0 and 1.0.0)
Thanks!
Diego Pino Navarro
Director of Digital Strategy
Archipelago architect
Metropolitan New York Library Council
PO Box 2084
New York, NY 10108
… On Nov 7, 2022, at 2:47 PM, Albert Min ***@***.***> wrote:
Resolves #236 <#236> and #237 <#237>.
The check for NULL was already there. Just needed to move the rest of the metadata display entity rendering into the try block. Also discovered a small YAML typo while testing.
You can view, comment on, or merge this pull request online at:
#238 <#238>
Commit Summary
3524d95 <3524d95> Add citeproc-php to composer.json.
9e516d8 <9e516d8> Stupid mistake! citeproc-php version should be dev-master.
ee110da <ee110da> Fix UUID Autocomplete validator when using Ajax (Views)
4dbcfdf <4dbcfdf> Check for bibliography node in style XML and only add to list if it exists.
e0875c3 <e0875c3> Check for bibliography node in style XML during render and log if it doesn't exist.
6ff281d <6ff281d> Oops, forgot a space in the log message.
f7aa7a6 <f7aa7a6> Refactor bibliography check to use citeproc-php methods.
5b4b815 <5b4b815> Forgot to clean up xml loading after previous refactor, dur.
b1f23e5 <b1f23e5> Fix spacing issue in schema and move metadata display entity processing in citation formatter into try block to check for NULL.
File Changes (5 files <https://github.com/esmero/format_strawberryfield/pull/238/files>)
M composer.json <https://github.com/esmero/format_strawberryfield/pull/238/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34> (3)
M config/schema/format_strawberryfield.schema.yml <https://github.com/esmero/format_strawberryfield/pull/238/files#diff-c6547982a3cefadef8556af79bca2a23ed8462135319f4530867d002f9c7ddb5> (38)
M src/CiteProc/Render.php <https://github.com/esmero/format_strawberryfield/pull/238/files#diff-4e73ee575a2f422f271cc8eaeadbe65d6bc6909a9dc1e325b80e6184acec7ddd> (68)
M src/Element/EntityAutocompleteUUID.php <https://github.com/esmero/format_strawberryfield/pull/238/files#diff-2a9cce2bae56b509f76e1db7250d5cc127069f456128fb47ce2d137154a46ced> (24)
M src/Plugin/Field/FieldFormatter/StrawberryCitationFormatter.php <https://github.com/esmero/format_strawberryfield/pull/238/files#diff-6ec7cf5efe71c3632171be6ff41aaaf47fb097d55ba0265ad1ade317f6b83400> (92)
Patch Links:
https://github.com/esmero/format_strawberryfield/pull/238.patch <https://github.com/esmero/format_strawberryfield/pull/238.patch>
https://github.com/esmero/format_strawberryfield/pull/238.diff <https://github.com/esmero/format_strawberryfield/pull/238.diff>
—
Reply to this email directly, view it on GitHub <#238>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABU7ZZ4DO3PUOD4POHWINV3WHE6BNANCNFSM6AAAAAARZOEA4E>.
You are receiving this because your review was requested.
|
…processing in citation formatter into try block to check for NULL." This reverts commit b1f23e5.
…y block to check for NULL.
DiegoPino
approved these changes
Nov 7, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #236 for branch 1.1.0.
The check for NULL was already there. Just needed to move the rest of the metadata display entity rendering into the try block.