Forums/Community/Zendesk Apps

Requester email placeholder "undefined" in Text App

Jonathan March
posted this on November 03, 2012 11:13

We use a trivial Text App which includes several URLs, each of which includes requester email placeholder. This has always worked perfectly, but for the past few days (since early Nov 1?) this placeholder frequently (usually?) returns "undefined" until the Apps panel is reloaded. Sometimes several Apps reloads are required.

Perhaps related to this?: https://support.zendesk.com/entries/22311497-bug-in-event-listener-...

 

Comments

User photo
Mike
yabdab

I am seeing the same thing. Nearly every initial load throws the error. I need to Reload Apps every time.

Is there a way in the app to loop until that value is found/available?

November 09, 2012 05:35
User photo
Fabian Dittrich
Zendesk

I ran into the same issue. Apparently there is a way to wait until all dta is loaded, it's documented here:

http://developer.zendesk.com/documentation/apps/reference/events.ht...

November 09, 2012 05:45
User photo
Mike
yabdab
November 09, 2012 05:47
User photo
Jonathan March
Enthought

1. Why did this just start happening in the past week?

2. If this is now a common problem, then surely the fix should be at the level of the Apps panel loading, not have to be included in every App?

3. But if this is what it takes, then why does the standard Text App not use these techniques?

November 09, 2012 05:54
User photo
Jesse

I figured this one out.  You have to combine "wait until everything loads" (https://support.zendesk.com/entries/22019977-tip-delay-app-loading-...) with a second template (or template within a template or something) to switch views after loading is complete.  All this does it stick the requester's email into the scope of the second template so that you can use it in, e.g., a link.

Honestly, I beat my head against the wall for quite awhile on this one.  I'd probably appreciate the new app structure for something complex, but this is pretty ridiculous for something as basic and useful as a contextual link.

Attached is the full zip - I basically hacked up the bookmarks example, so it still has Zendesk icons and the like.  It's very ugly but it works, though it doesn't always load reliably and you have to refresh Apps every other time or so.

January 02, 2013 14:03
User photo
Jonathan March
Enthought

Many thanks, Jesse. ZD, can we all get an updated Text App soon that does the same without the detritus?

January 02, 2013 14:20
User photo
Jesse

Glad that I could help.  To be clear, all that you need to edit is the templates/lists.hdbs file if you need links that reference the ticket or requester.  That may save you some additional time.

January 02, 2013 17:02