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

LinkIt fields aren’t saving correctly #19

Closed
joshuabaker opened this issue Jul 23, 2015 · 5 comments
Closed

LinkIt fields aren’t saving correctly #19

joshuabaker opened this issue Jul 23, 2015 · 5 comments

Comments

@joshuabaker
Copy link
Contributor

The cell is returning a Twig_Markup instance with an empty link string, instead of the expected array.

<a href=""></a>
@theskyfloor
Copy link

That's odd... I am using SuperTable and Linkit together and mine are saving. Is the error coming up on the template side? Or when you save in the back end? Is your Linkit field in a SuperTable cell on the top level or in a Matrix in a SuperTable?

I am not the developer of course... I am just curious if I can be of any help!

@joshuabaker
Copy link
Contributor Author

Thanks, @theskyfloor!

The field is inside a SuperTable block, which is inside a Matrix block.

I’ve tested and it works as expected when used outside of SuperTable.

@engram-design
Copy link
Member

@joshuabaker I can't seem to replicate this. See the below screenshots for my field setup, which is pretty normal. Going to go out on a limb here - I hope your Linkit field's handle isn't link?

Like @theskyfloor mentioned - is this an issue when you're saving the Super Table field from the control panel, or an error that pops up when viewing the template from the front-end?

screen shot 2015-07-24 at 10 57 41 pm
screen shot 2015-07-24 at 11 00 04 pm

{% for block in entry.matrixSuperTableLinkit %}
    {% for row in block.superTable %}
        {{ row.linkUrl.url }}<br>
    {% endfor %}
{% endfor %}

Renders:
/test
http://client.craft.dev/news/test

@joshuabaker
Copy link
Contributor Author

Oh deer, this is embarrassing

The handle was indeed link.

Sorry! Thanks for taking the time to check on this.

@engram-design
Copy link
Member

@joshuabaker +2 points for that pic haha! Glad that's all it was.

On a related note, I'm really struggling to make validation work when the ST field is inside a Matrix. It's something that I'm not even sure is possible without P&T making some changes on their end. That would solve a lot of these problems 😄

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

No branches or pull requests

3 participants