Welcome, Guest
Username: Password: Remember me

TOPIC: [CLOSED] Image Picker Problem in path

[CLOSED] Image Picker Problem in path 18 Jan 2012 06:52 #1014

  • mossss
  • mossss's Avatar
  • Offline
  • Premium Member
  • Posts: 100
  • Thank you received: 7
  • Karma: 9
Hi, I just downloaded a fresh install of my component. In the previous version the colour picker was working fine.

In the new version. It seems that the [IMAGES] folder is getting set twice, once in the PHP and once in the js script. I am saving to the default SIte Images folder and have to have the com_media settings to save to the images folder.

In the component options, it seems to make no difference what I put in the configuration UPload folder for that field (which would make sense as I think this is only for use with the uploader???)

without any changes this sets the value in the field to be [IMAGES]images/foldername/file.png whereas obviously it should be [IMAGES]/foldername/file.png (or images/foldername/file.png).

If I change the insert.js line $(field).value = '[IMAGES]' + path to: $(field).value = path

Then this puts the correct value into the db field, but then it will not appear on the grid, forms or fly views.

I could continue on and modify the dom for those elements, but a bit reluctant to go down that route when think there is probably a simpler answer somewhere.

Any ideas. either I am misunderstanding the way this works or its a bug somewhere.

I would really appreciate a quickish answer on this. Thanks

update - have made it work for now by editing insert.js to remove the first part of the path. It seems to work but might have some implications elsewhere.
Last Edit: 18 Jan 2012 08:16 by mossss.
The administrator has disabled public write access.

Re: Image Picker Problem 24 Jan 2012 01:25 #1029

  • mossss
  • mossss's Avatar
  • Offline
  • Premium Member
  • Posts: 100
  • Thank you received: 7
  • Karma: 9
finally got my component uploaded to server. On the server the original code works fine without my "fix".

another point to note is that images that were batch uploaded with . JPG extensions rather than .jpg extensions do not show on the live server, I know this is an elementary thing, but perhaps would be good to have some sort of case check and renaming in the mime check. Or, if its an issue of overwriting, then some sort of error message in the front end if a grid discovers that files with capitalized extensions exist.

Again this was working fine on localhost and the problem only appeared when uploaded.

thanks
The administrator has disabled public write access.

Re: Image Picker Problem 24 Jan 2012 17:45 #1051

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
without any changes this sets the value in the field to be [IMAGES]images/foldername/file.png whereas obviously it should be [IMAGES]/foldername/file.png (or images/foldername/file.png).


Yes. I remember I fixed something in this way (few weeks ago).
I don't know if the problem remains for you. But I think it is gone.

For capitalized extensions, I open a new ticket for it.

Without answer from you, I close this one.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.085 seconds

Get Started