-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[#33965] Update the ImageManager js object #3919
Conversation
Tracker has some test instructions. |
I added the test instructions from joomlacode to the original post |
Tested and is working generated this code: Test meURL to testbed: http://gothard.dk/joomla/index.php?option=com_content&view=article&id=1:getting-started&catid=2:uncategorised&Itemid=101 |
The code was ofcause filtered out - check it out on the testbed link. |
@test, |
@test it happen when i'm double-click on folder in frame |
I see the same issues as AnishaVora and tairedweb
|
Thanks guys. I'll try to have a look at to these issues next week. |
@test OK, but: TypeError: u is undefined |
I can't seem to duplicated these errors in chrome. I'll try other browsers. What browsers are y'all using? |
Nevermind, I'm finding them now. |
c50d3fa
to
5631666
Compare
This ought to fix it. Do you ever look at some code you wrote a while ago and think: how did this even work at all? |
@test, tested on Joomla 3.3.6, 'Edit Article'
ReferenceError: com_content is not defined
ImageManager.setFolder(this.options[this.selectedIndex].value, com_content, 55)
|
@anibalsanchez the 'Select a directory' bug is not related to this file (try it on a clean install, you'll see) so I'd prefer not to include it in this PR. The bug is actually in $list = JHtml::_('select.genericlist', $options, 'folderlist', 'size="1" onchange="ImageManager.setFolder(this.options[this.selectedIndex].value, '.$asset.', '.$author.')" ', 'value', 'text', $base); should change to $list = JHtml::_('select.genericlist', $options, 'folderlist', 'size="1" onchange="ImageManager.setFolder(this.options[this.selectedIndex].value, ' . json_encode($asset) . ', ' . $author . ')" ', 'value', 'text', $base); I'll put in a different PR for that one. |
Here #5077 |
@test OK:
Error:
|
@okonomiyaki3000 the fix from #5077 is already applied in joomla 3.4.0 - but it's not fixing the problem with the current directory not showing up. Specific the fixed line in #5077 I'm refering to:
|
In this modal window, when I switched in a subfolder and upload an image it is allways stored in the images root folder, no matter in wich subfolder I actually am. This happend with and without this patch in J-3.4. As this behaviour is not in J-3.3.6, it seems to be a 3.4 bug. @okonomiyaki3000 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/3919. |
5631666
to
e8f3a5f
Compare
@okonomiyaki3000 Could you please have a look at the issues mentioned? Thank you. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/3919. |
Rebased with latest staging but couldn't reproduce the bug. Everything is working perfectly in Chrome. @Chalkin @peterpeter , what browsers are you guys using? |
438a8e9
to
b3aab7b
Compare
Ah, you are using Chrome. Well, I can't imagine why you got this error. Any messages in Chrome's console? |
I'm using chrome on mac (current chrome) - I will check in the evening if the problem still exists since it's been a while. |
I've used FF on windows....I check it later on too, with different browsers |
I have reproduced the reported issue. If you navigate to a subfolder and upload an image, it works Ok. However, if you choose a subfolder from "Directory", it shows the subfolder. But, when you upload an image, it is saved in / and jumps to /. |
Thanks! That might help. I'll try it tomorrow. |
Thanks for your help guys, this should fix it. The problem was that, in some cases a url was getting double encoded. There's an iframe that contains the current directory list and it gets changed when changing directories. This can happen by a link (clicking a folder in the list) which worked fine because it was a perfectly "natural" process. It can also happen by javascript (a result of using the folder select or 'up' button). The javascript way had a problem because I was forming the query string part of the url by using JQuery's So now it's fine. |
@text OK |
conflicts, eh? We'll see about this... |
- No dependence on Mootools - Support both jQuery and Mootools version of Chosen (whichever is installed will just work) - Remove/consolidate unneeded/repetitious code - Fix bugs such as uninitialized variables
…object from getUriObject
72ce0cf
to
95a3099
Compare
Rebased with staging. Should merge now. |
@anibalsanchez I think you meant to say @test OK |
Ahhh fat fingers!!! @test OK |
I have tested this item ✅ successfully on 95a3099 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/3919. |
@okonomiyaki3000 can you fix merge conflicts? Than we can RTC based on @designbengel and @anibalsanchez 's tests 😄 |
This can be easily fixed by a commiter: |
installed will just work)
Tracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33965&start=0
test instructions
This file is used only by the 'images' view of com_media which is used inside an iframe in a modal dialog when the 'Image' button is clicked under an editor. So this can be tested on any page that uses an editor such as the 'Edit Article' page. The script manages such things as changing directories (using the select or the 'up' button) and it handles generating the img tag (or figure tag set) and inserting into the editor. So you can test that those functions are behaving as usual.