Skip to content
This repository has been archived by the owner on Jul 17, 2018. It is now read-only.

Liquid error: can't convert nil into String #57

Closed
jnns opened this issue May 8, 2013 · 5 comments
Closed

Liquid error: can't convert nil into String #57

jnns opened this issue May 8, 2013 · 5 comments

Comments

@jnns
Copy link

jnns commented May 8, 2013

When composing a new draft there are liquid errors in the URL slug field, the title field, the body field and in the follwowing javascrip section:

<script>
    var Serif = {
        "variables": {
                "imageUploadPattern": "/images/:timestamp_:name",
                "currentSlug": Liquid error: can't convert nil into String
Uncaught SyntaxError: Unexpected identifier
            }
        };
</script>

It looks more like I'm missing a dependency like a coding error, but as I'm not fluent in Ruby at all I have no idea where to look.

@aprescott
Copy link
Owner

Thanks for reporting this. Not sure how this made its way into a release. It'll be fixed in a few hours and I'll push a new release so you can update.

If you're curious, this is a bug introduced by 92a8c17 when a Serif::Draft has no path.

@aprescott
Copy link
Owner

By the way, until then, you should be able to insert your own title and URL slug and hit save on the draft as usual. Everything else should be fine, you just can't add any images until after you've saved the draft and re-load it to edit it.

aprescott added a commit that referenced this issue May 8, 2013
For brand-new Draft/ContentFile instances with a nil path value, these
two methods are broken, and thus so is to_liquid. This primarily breaks
the new draft page, where nothing is set.

See #57.
@aprescott
Copy link
Owner

This is fixed by #58. A new release will come shortly, and you can gem update serif. Thanks again for reporting!

@aprescott
Copy link
Owner

@jnns as announced, 0.5.2 has been pushed, so you should be able to update. Apologies for the delay!

@jnns
Copy link
Author

jnns commented May 11, 2013

No worries. I ran the update and it works beautifully now. Thank you very much!

@jnns jnns closed this as completed May 11, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants