Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$(...).render is not a function at uploader.js #52

Open
beatriznbarroso opened this issue Sep 9, 2019 · 10 comments
Open

$(...).render is not a function at uploader.js #52

beatriznbarroso opened this issue Sep 9, 2019 · 10 comments

Comments

@beatriznbarroso
Copy link

I always have this error when I don't hard refresh the page.

Uncaught TypeError: $(...).render is not a function at uploader.js:319 at uploader.js:323 (anonymous) @ uploader.js:319 (anonymous) @ uploader.js:323

I have looked online and I have
{% framework extras %}

and then
{% scripts %}

if I change
$(document).render(function () { $('[data-control="fileupload"]').fileUploader() })

to

$(document).ready(function () { $('[data-control="fileupload"]').fileUploader() })
it works perfectly. Does anyone have any idea of how I can fix this issue without changing this line of code in uploader.js?

@LukeTowers
Copy link

@beatriznbarroso what version of jQuery are you loading? If you load the backend's jquery version with {% jquery %} instead of whatever your theme uses already (put it before the framework tag) then it should work.

@dlr1251
Copy link

dlr1251 commented Oct 21, 2019

Hello, I am getting the same issue. Which JQuery version should I use? I am currently using 1.11

@LukeTowers
Copy link

@dlr1251 just use the one built into October with {% jquery %}, v3.something

@vdomah
Copy link

vdomah commented May 27, 2020

@LukeTowers
HI. After inserting {% jquery %} I get

Unknown "jquery" tag.

What could be the cause?

@LukeTowers
Copy link

@vdomah the {% jquery %} tag doesn't exist, it's @jquery for the script combiner. So do <script src="{{ ['@jquery'] | theme }}"></script>

@vdomah
Copy link

vdomah commented Jun 7, 2020

Problem not solved by using <script src="{{ ['@jquery'] | theme }}"></script>
jquery gives a log message so it's included on the page. But render error is still present:

Знімок екрана  о 09 56 44

@LukeTowers
Copy link

@vdomah did you make sure that it was loaded before anything else?

@vdomah
Copy link

vdomah commented Jun 8, 2020

Yes, like this:
Знімок екрана  о 08 38 07

@LukeTowers
Copy link

Could you paste the exact line that the error is being thrown on?

@makhlukgod
Copy link

Solution to the problem:

<script src="{{ [
        '@jquery',
        '@framework',
        '@framework.extras',
    ]|theme}}">
</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants