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

Drag and Drop with media resource fails #8

Open
pepebe opened this issue Aug 3, 2013 · 1 comment
Open

Drag and Drop with media resource fails #8

pepebe opened this issue Aug 3, 2013 · 1 comment

Comments

@pepebe
Copy link

pepebe commented Aug 3, 2013

Im not sure if this problem is caused by my custom media resource snippet or by ckeditor. I'll check on my side, but until I have found an answer here is a brief description of the problem.

Dragging an image from the file tab and dropping it into the ckeditor window results in a malformed url.

This is what I expect: id/0000/000/00/3/adidas.jpg

And this is what I get:

id/0000/000/00/3/id/0000/000/00/3/adidas.jpg

This only happens if a custom media resource includes a dynamic part (e.g. a snippet).

So setting the baseURL to id/0000/000/00/3/ is OK, but creating the baseURL with a snippet results is adding the filepath twice.

basePath andbaseUrl are both relative (yes) and set to [[id2path]].

id2path can be reviewed here: https://gist.github.com/pepebe/6148255

The media resource works with the file tab, image TVs, with modx-ckeditor file browser (with a hacked ckeditor.js) as well as modx normal drag and drop.

Regards,

pepebe.

@danyaPostfactum
Copy link
Owner

Can you disable CKEditor and see what you get on drag'n'drop into a plain textarea?

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