onestarter icon indicating copy to clipboard operation
onestarter copied to clipboard

Cannot read property 'client' of undefined

Open Opopanax opened this issue 11 years ago • 4 comments

image

I'm using the zips provided in the recent release. When the page loads the console returns "Uncaught typeError: Cannot read property 'client' of undefined" Screenshot above includes all the text. This causes the page to load but majority of the styles aren't applied.

<apex:includeScript value="{!URLFOR($Resource.jquery)}"/>

<apex:stylesheet value="{!URLFOR($Resource.OneStarter,'icons.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.OneStarter,'styles.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.OneStarter,'OneStarter.css')}"/>

<apex:includeScript value="{!URLFOR($Resource.TouchSwipe,'jquery.touchSwipe.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.OneStarter,'jquery.onestarter.js')}"/>  

Opopanax avatar Feb 21 '14 19:02 Opopanax

This is because (in part) the publisher.js file is not included. Including that will fix this, but I would prefer that is not a requirement. So looking at the checks in the plugin so that it doesn't try to execute anything canvas when it can't. I'll keep this open until that's fixed.

joshbirk avatar Feb 21 '14 19:02 joshbirk

Ahh, I forgot <apex:includeScript value="/canvas/sdk/js/publisher.js"/> - I'm copy and paste inept apparently. Adding that did remove the error. I still get those GET error with https://c.cs16.visual.force.com/resource/1393000363000/OneStarter/fonts/proximanovasoft-semibold-webfont.ttf

https://c.cs16.visual.force.com/resource/1393000363000/OneStarter/fonts/proximanovasoft-regular-webfont.ttf

https://c.cs16.visual.force.com/resource/1393000363000/OneStarter/fonts/proximanovasoft-medium-webfont.ttf

Not quite sure what line it's trying to get those files.

Opopanax avatar Feb 21 '14 19:02 Opopanax

It's S1's moderately unique font. I think it is actually the CSS which is calling it out. It may be something I can include the zip, will test. Shouldn't break overall styling though.

joshbirk avatar Feb 21 '14 19:02 joshbirk

Ah Ha! Some HTML 5 attributes were breaking the styling on the <apex:inputfied /> Removing type="email" html-placeholder="[email protected]" html-title="Please enter an example.com email address"

Fixed the style on the input field. Stylings are still broken on the <apex:commandbutton />

<div id="one-app">        
    <apex:form id="MainForm">
        <apex:outputpanel id="errors">
            <apex:pagemessages />  
        </apex:outputpanel>
        <div id="form">
            <h2>Attendee SignIn</h2>
            <section>
                <apex:inputfield value="{!FakeContact.Email}"/>
                <apex:commandButton value="Search"  action="{!SearchForAttendee}" rerender="AttendeeInfo,Errors"  oncomplete="restyle();"/>
            </section>
        </div>
        </div>

Opopanax avatar Feb 21 '14 19:02 Opopanax