elivz / VzAddress-Craft

Address fieldtype for the Craft CMS
30 stars 13 forks source link

Unable to use line break options #3

Closed daniellelecomte closed 9 years ago

daniellelecomte commented 9 years ago

Hey there - thanks for this plugin!

I am unable to use {{ entry.fieldName.text(true) }} or {{ entry.fieldName.html }}

nor any of the address components. Would really love to be able to get the line breaks working in the addresses. I'm on Craft 2.4.2679

Any ideas? Thanks again!

elivz commented 9 years ago

Hey there!

When you say it doesn't work, what do you mean? I.e. what are you expecting and what is it doing instead? Or are you actually getting an error message? What PHP version are you running?

I just tried both of those tag options and they seem to be working properly for me, so something is different between your system and mine - we just need to figure out what :)

daniellelecomte commented 9 years ago

Hey Eli. Thx for getting back to me.

When I say doesn't work, I actually don't get any errors, but also don't get anything rendering on the page. I was wrong about the address components though - those work for me.

I am running PHP 5.6.10 on my local setup.

elivz commented 9 years ago

Huh....very strange. I'm not even sure where to start with debugging that. Do you have devMode turned on in your configuration file? If that is off, it will hide error messages that might give us more information about what is going on. It also might be worth re-uploading a fresh copy of the plugin, in case one of the files went missing somehow.

thomasthesecond commented 9 years ago

I seem to be having a similar, if not the same, issue. When I try to use any of the template variables, I see this error:

And here's the relevant snippet from my markup:

<main class="main" id="main" role="main" tabindex="0">
  {% block content %}{% endblock %}
</main>

{% include '_partials/global/footer' %}

I'm trying to load the address data within the block. I've even tried to render it outside of the block. Essentially, any include that comes after the address field cannot be found. If I comment out all subsequent includes, the template variable renders. It seems like the template variable doesn't like any include that follows it, no matter the contents of that include.

I thought maybe there was a syntax error in one of the templates located at templates/_frontend but altering the code doesn't change anything.

My address field exists within a global and not an entry. Could that have anything to do with it?

elivz commented 9 years ago

Try downloading a new copy from GitHub. I believe I have fixed this bug.

thomasthesecond commented 9 years ago

Thanks for looking into that so quick.

When I add the new files, I see the following message:

screen shot 2015-08-12 at 9 51 13 am

If I revert, the message goes away.

elivz commented 9 years ago

That happens any time you update a plugin in Craft. Logging into the control panel will fix it.

thomasthesecond commented 9 years ago

Ah! My fault. Sorry about that.

All of the template variables are working for me now. Thanks!

elivz commented 9 years ago

No problem. That's tripped me up more than a few times as well.

Please feel free to open a new issue if you run into any other problems!

daniellelecomte commented 9 years ago

The updated version is working great for me! Thank you!