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

[bug] kendoui editor with custom image Browser on uploadUrl, error: "too much recursion" #55

Closed
Jorgelig opened this issue May 6, 2014 · 1 comment

Comments

@Jorgelig
Copy link

Jorgelig commented May 6, 2014

I'm using the editor to image gallery of Kendo UI, the editor works fine (links, formats, etc. ..) and upload the photos to the gallery and read a service (rest); the problem is that when wanting to insert any image in the gallery get the error:

"too much recursion ... ute (i)," string "== typeof r) {try {r =" true "=== r 0:" false "=== r1:" null "r === null: + r ... jquery .... min.js (line 3) "

The funny thing is that when you remove the configuration "uploadURL", if you insert pictures in the textarea; obviously the plugin no longer gives me the option to upload.

In the documentation (http://docs.telerik.com/kendo-ui/api/web/editor # configuration-ImageBrowser): did not find details about how to fix it.

HTML(Razr)

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/js/vendor/kendo-ui/kendo.all.min.js"></script>

<div class="k-content">
        <textarea id="KEditor" rows="10" cols="30" placeholder="@GetText("Content")" maxlength="255" style="height: 500px"></textarea>    
</div>

Js

$(document).ready(function() {
            $("#KEditor").kendoEditor({
                tools: [
                    "fontName", "fontSize", "foreColor",
                    "backColor", "bold", "italic",
                    "createLink", "unlink",
                    "insertImage",
                    "viewHtml"
                ],
                imageBrowser: {
                    transport: {
                        read: {
                            type: "GET",
                            url: "/api/sites/user-gallery",
                        },
                        destroy: "/api/sites/user-gallery?action=delete",
                        thumbnailUrl: function(path, name) {
                            var pictureUrl = decodeURIComponent(name);
                            return pictureUrl;
                        },
                        //work if this line is commented
                        uploadUrl: "/api/sites/user-gallery?action=upload", 
                        imageUrl: function(name) {
                            var pictureUrl = decodeURIComponent(name);
                            return pictureUrl;
                        },
                    }
                }          
                //, messages: { viewHtml: '@GetText("ViewHtml")'}
            });
        });

Json(read rest service):

{
   "pictureId":1369437,
   "name":"http://s3.amazonaws.com/nocnokdemo-img/1404301211033c10e4f43bdb468ba132ef12048d2438.jpg",
   "type":"f",
   "size":1024,
   "url":"http://s3.amazonaws.com/nocnokdemo-img/1404301211033c10e4f43bdb468ba132ef12048d2438.jpg"
}
@Jorgelig Jorgelig changed the title [bug] on kendoui editor with custom image Browser "too much recursion" [bug] kendoui editor with custom image Browser on uploadUrl, error: "too much recursion" May 6, 2014
@akorchev
Copy link
Contributor

akorchev commented May 7, 2014

Thanks for your post, and for your interest in Kendo UI! Unfortunately, your request is related to Kendo UI Professional and this repository is only for Kendo UI Core. I’m going to close this request with this comment, but I encourage you to leverage the Kendo UI Premium Forums or our support system at Telerik.com as both are benefits you receive as a part of being a commercial license-holder.

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

3 participants