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

Errors With Latest Version of widget #14

Closed
chodges opened this issue Oct 27, 2014 · 4 comments
Closed

Errors With Latest Version of widget #14

chodges opened this issue Oct 27, 2014 · 4 comments

Comments

@chodges
Copy link

chodges commented Oct 27, 2014

I just installed the widget in an advanced template and when I attempt to use it I'm getting the following error:

TypeError: undefined is not a function (evaluating 'jQuery("#event-description").redactor')
(anonymous function) (create, line 304)
fire (jquery.js, line 3073)
fireWith (jquery.js, line 3185)
ready (jquery.js, line 3391)
completed (jquery.js, line 3407)

Here is the code I'm using:

<?php
    echo $form->field($model, 'description')->widget(vova07\imperavi\Widget::className(), [
        'settings' => [
            // 'lang' => 'ru',
            'minHeight' => 200,
            'pastePlainText' => true,
            'plugins' => [
                'clips',
                'fullscreen'
            ]
        ]
    ]);
    ?>

Any ideas what I might be doing wrong?

Thanks.

@vova07
Copy link
Owner

vova07 commented Oct 27, 2014

Your code looks good, no evident errors there.
Is there only this JS error? Or maybe there are some JS conflict?

@chodges
Copy link
Author

chodges commented Oct 27, 2014

Yes the code is fine. It turns out that I'm using the advanced template and for some reason the widget only works on a FRONTEND view. A BACKEND view is what is giving me these errors. If you have any information on what I should change to make it work on the BACKEND I'd really appreciate it.

@vova07
Copy link
Owner

vova07 commented Oct 27, 2014

If widget work on frontend bunt not on backend, this mean that the problem is in your backend code, not in widget classes. I'm not sure how can I help in this case without demo code. Maybe you have a demo site?!

@chodges
Copy link
Author

chodges commented Oct 27, 2014

I figured it out. There was something wrong with my configuration files. All is well. Great widget. Thanks!

@chodges chodges closed this as completed Oct 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants