Posted: 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? |
Hi Simon, Could you post a screenshot of the venue address in the venue editor? — |
|
|
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 |
I was able to view your link. Does United Kingdom work? — |
|
|
Changing it to the UK does this: http://ee.stagebe.co.uk/venues/the-lion-and-swan-hotel/ Very strange :/ |
|
(And obviously still cutting off the County) |
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’? |
|
|
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 |
|
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.
|
|
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. |
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? |
|
|
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? |
|
Yes I have just checked, changing it to England in the Venue editor puts “43” and selecting UK puts “UM” |
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: |
|
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.