1

I am on EE 2.7.2

Here is my channel form tag that has grid data

{exp:channel:form
    channel="xxxxx"
    class="form-horizontal"
    datepicker="no"
    dynamic_title="[email]"
    edit_member="yes"
    entry_id="{embed:entry_id}"
    error_handling="inline"
    id="basic_information"
    include_assets="yes"
    include_jquery="yes"
    member_id="CURRENT_USER"
    rules:profile_name="required"
    rules:user_provided_address="required"
    return="/xxxxx/"
}

In the page I am using Grid, I have tried doing various permutations of include_assets and include_jquery to make an JS error go away because it blocks Grid from working properly(Grid relies on JS)

CASES

  • include_assets="yes", include_jquery="yes"

I have this JS error in the console

ReferenceError: EE is not defined

This is the script being included

 http://xxxxx.com/?ACT=7&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog&plugin=markitup,toolbox.expose,overlay,tmpl&file=cp%2Fsort_helper,cp%2Fgrid,underscore&v=1381722060&include_jquery=y
  • include_assets="yes", include_jquery="no"

I have this JS error in the console

ReferenceError: jQuery is not defined
ReferenceError: jQuery is not defined

This is the script being included

http://xxxxx.com/?ACT=7&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog&plugin=markitup,toolbox.expose,overlay,tmpl&file=cp%2Fsort_helper,cp%2Fgrid,underscore&v=1381722060

http://xxxxx.com/themes/third_party/mx_lonestar/js/jquery.mx_lonestar.min.js
  • include_assets="no",include_jquery="yes"

I have this JS error in the console

ReferenceError: EE is not defined

This is the script being included

http://xxxxx.com/?ACT=7&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog&plugin=markitup,toolbox.expose,overlay,tmpl&file=cp%2Fsort_helper,cp%2Fgrid,underscore&v=1381722060&include_jquery=y
  • include_assets="no",include_jquery="no"

I have this JS error in the console

ReferenceError: jQuery is not defined
ReferenceError: jQuery is not defined

This is the script being included

http://xxxxx.com/?ACT=7&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog&plugin=markitup,toolbox.expose,overlay,tmpl&file=cp%2Fsort_helper,cp%2Fgrid,underscore&v=1381722060

http://xxxxx.com/themes/third_party/mx_lonestar/js/jquery.mx_lonestar.min.js

NOTE: There is a jquery script at the bottom of the page included

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>

Is there any solution to this problem? I have tried to debug this for a week already but to no avail.

2
  • It's likely to be caused by the JS that gets embedded directly into the page. Are you able to provide a link to a page that produces the error? If not, a copy/paste of the generated HTML (view source) should suffice to help us debug the problem. Oct 18 '13 at 3:23
  • just for sure - user which u use for test, can post and edit entries in this channel?
    – Max Lazar
    Oct 18 '13 at 13:30
1

There is a jquery script at the bottom of the page include

I believe this is the reason - you need to load your jquery library before other scripts.

p.s. this answer has good solution what you can do in this case

1
0

Add include_jquery="no" to the tag and move your jQuery from the footer to the header.

From this answer on StackOverflow...

"make sure that you are not loading any plugins before you load jQuery. Plugins extend the "$" object, so if you load a plugin before loading jQuery core, then you'll get the error you described."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.