Support

Home Forums Event Espresso Premium Address not showing correctly?

Address not showing correctly?

Posted: July 25, 2014 at 10:43 am


Simon Belcher

July 25, 2014 at 10:43 am

Hi guys,

Need a quick bit of tech help, my theme which pulls in most of the Arabica stuff is playing up a bit, the address at the bottom of the single venue page is a bit squiffy:

“1 Swan Bank, Town Centre, Congleton, Cheshi, 43, CW12 1AL”

(http://ee.stagebe.co.uk/venues/the-lion-and-swan-hotel/)

Is an example of the problem, it is cutting the County short and swapping the country for a number?

Any ideas?


Lorenzo Orlando Caum

  • Support Staff

July 25, 2014 at 8:26 pm

Hi Simon,

Could you post a screenshot of the venue address in the venue editor?


Lorenzo


Simon Belcher

July 26, 2014 at 7:54 am

Hey,

I can’t I’m afraid, the site is coming up as blocked by Firehost if I try and add an image tag?

Here’s the link:

No problemo:

http://dl.dropboxusercontent.com/u/30288/Temporary/EE-Venue-Address.png


Lorenzo Orlando Caum

  • Support Staff

July 26, 2014 at 8:00 am

I was able to view your link. Does United Kingdom work?


Lorenzo


Simon Belcher

July 26, 2014 at 8:36 am

Changing it to the UK does this:

http://ee.stagebe.co.uk/venues/the-lion-and-swan-hotel/

Very strange :/


Simon Belcher

July 26, 2014 at 8:37 am

(And obviously still cutting off the County)


Tony

  • Support Staff

July 28, 2014 at 6:05 am

Hi Simon,

We have an open ticket to address this issue and I have added this thread to that.

If you go to Event Espresso -> General Settings. Countries tab.

Select United Kingdom within the list.

Can you see the Cheshire county within the ‘States’?

If you look in the Code field for Cheshire, does it say ‘Cheshi’?


Simon Belcher

July 28, 2014 at 6:41 am

This isn’t a page we’d ever viewed before, but here is whats there:

https://dl.dropboxusercontent.com/u/30288/Temporary/EE-States.png


Sidney Harrell

July 28, 2014 at 2:56 pm

The offending line is in core/helpers/assets/EEH_Formatter.helper.php on line 453:

return $obj_with_address->state_obj() instanceof EE_State ? '' . $obj_with_address->state_obj()->abbrev() . '' : '';

We have a proposed change on the ticket Tony created:

return $obj_with_address->state_obj() instanceof EE_State ? apply_filters('FHEE__EEH_Formatter_address_region_format','' . $obj_with_address->state_obj()->abbrev() . '' , $obj_with_address): '';

If that proposed change is adopted, you can then create a function

function custom_espresso_address_region( $original, $obj_with_address) {
return $obj_with_address->state_obj() instanceof EE_State ? '' . $obj_with_address->state_obj()->name() . '': '';
}
add_filter('FHEE__EEH_Formatter_address_region_format','custom_espresso_address_region',10,2);

So you would make that change to the core file, then add that custom function (see http://youtu.be/pqe1RQ4peAM if you need help adding the custom fuction). If the proposed change to EE4 core is adopted and the filter added, then your custom function will continue to work the next time you update EE4.

  • This reply was modified 9 years, 9 months ago by  Tony. Reason: Fixed pre tags


Simon Belcher

July 29, 2014 at 2:35 am

I have amended the line in the helper file, and added the custom function to functions.php. The result is no change in the backend (still a very small counties list whereby one is not a county but a country and the other gobbledigook) and on the front end the address no longer displays:

http://ee.stagebe.co.uk/venues/the-lion-and-swan-hotel/

If somebody could help it would be much appreciated.


Tony

  • Support Staff

July 29, 2014 at 2:38 pm

Hi Simon,

The forum syntax highlighter went a litter strange with the code Sidney posted, we have now amended this to display correctly and have altered the code slightly.

Could you re-apply the changes above replacing the previous code or using the example here:

https://gist.github.com/joshfeck/e7ad286a897ebeec86a3

Also to note, there should be no change within the Admin, that function changes the formatting to use the State ‘name’ rather than the ‘code’ which is currently what is used.

How are you currently adding the counties into Event Espresso?


Simon Belcher

July 30, 2014 at 4:18 am

Sorry to be a pain guys, but this still isn’t there… It has sorted the abbreviation of county but there is still some unknown characters afterwards… presumably in place of “UK”?

http://ee.stagebe.co.uk/venues/the-lion-and-swan-hotel/

Any ideas?


Simon Belcher

July 30, 2014 at 4:21 am

Yes I have just checked, changing it to England in the Venue editor puts “43” and selecting UK puts “UM”


Tony

  • Support Staff

July 30, 2014 at 6:15 am

I’d like to investigate this further.

Would it be possible for me to login and take a look? If so could you send temporary login details using:

https://eventespresso.com/send-login-details/

The support post ‘Address not showing correctly?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso