Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [BUG] Edit file information - Keywords  (Read 5873 times)

0 Members and 1 Guest are viewing this topic.

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
[BUG] Edit file information - Keywords
« on: July 04, 2007, 12:06:21 pm »

When you Upload file on the second stage you have field:
Keywords (separate with spaces)
Insert from list


In english.php this is line:
Code: [Select]
'keywords' => 'Keywords (separate with spaces)<br /><a href="#" onClick="return MM_openBrWindow(\'keyword_select.php\',\'selectKey\',\'width=250, height=400, scrollbars=yes,toolbar=no,status=yes,resizable=yes\')">Insert from list</a>', //cpg1.4of section:
Code: [Select]
if (defined('UPLOAD_PHP')) $lang_upload_php = array(
Screen shot #1



When you Edit file information you have field:
Keywords

But, as you see it doesn't have:
  • Note: (separate with spaces)
  • Link: Insert from list

In english.php this is line:
Code: [Select]
'keywords' => 'Keywords',of section:
Code: [Select]
if (defined('EDITPICS_PHP')) $lang_editpics_php = array(
Screen shot #2


To fix this one we have just to change line:
Code: [Select]
'keywords' => 'Keywords',of section:
Code: [Select]
if (defined('EDITPICS_PHP')) $lang_editpics_php = array(
to line:
Code: [Select]
'keywords' => 'Keywords (separate with spaces)<br /><a href="#" onClick="return MM_openBrWindow(\'keyword_select.php\',\'selectKey\',\'width=250, height=400, scrollbars=yes,toolbar=no,status=yes,resizable=yes\')">Insert from list</a>',
And here we are:
Screen shot #3
« Last Edit: July 05, 2007, 09:50:11 am by GauGau »
Logged

Singular

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
    • A Singular Creation
Re: [BUG] Edit file information - Keywords
« Reply #1 on: July 04, 2007, 08:31:41 pm »

Hey thanks. I was wondering about this issue.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [BUG] Edit file information - Keywords
« Reply #2 on: July 05, 2007, 08:09:14 am »

Not a bug, but a missing feature. Once a version is released, only bug fixes are allowed. I'm reluctant to modify the language files - as suggested in another, similar thread, editing the english language file triggers other language files to be edited as well. Most of those edits are not being done properly, that's another reason why I'm reluctant to accomplish this.
I'll edit this for cpg1.5.x, but nor for cpg1.4.x
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [BUG] Edit file information - Keywords
« Reply #3 on: July 05, 2007, 08:27:00 am »

Looking into this in detail it appears that your suggested "fix" wouldn't work as expected: it would show the "insert from list" link, but the pop-up wouldn't do anything at all - your suggestion would need changes in "keyword_select.php" as well. Shouting "bug" is not a bright thing unless you know what you're doing - you should have tested more thoroughly ... ::)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [BUG] Edit file information - Keywords
« Reply #4 on: July 05, 2007, 09:49:33 am »

OK, finally comitted modified code to the subversion repository (cpg1.5.x). This got more complicated than I thought. Definitely won't go into cpg1.4.x, as it would require serious core code changes. Marking thread as "Invalid", as the initial report definitely is not a valid bug report.
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
Re: [BUG] Edit file information - Keywords
« Reply #5 on: July 05, 2007, 11:48:26 pm »

Looking into this in detail it appears that your suggested "fix" wouldn't work as expected: it would show the "insert from list" link, but the pop-up wouldn't do anything at all - your suggestion would need changes in "keyword_select.php" as well. Shouting "bug" is not a bright thing unless you know what you're doing - you should have tested more thoroughly ... ::)
Sometimes, GauGau, I think that you don't like me :-[ Really...
It works on my site. Both for english.php and russian.php. Works in IE6, IE7, Opera 9.*.
The only thing where this one doesn't work is in FireFox.
I always test such things, but this world is so big... Safari is also here... ;D

And I can explain my I called this one a bug. When one future/process/idea is broken (I speak about inserting from list), then from my opinion it is a bug.
This is not future suggestion in any way as this one (inserting from list) is already there.

Thanks, GauGau, for "fixing" this "bug" :P
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [BUG] Edit file information - Keywords
« Reply #6 on: July 06, 2007, 09:52:48 am »

It works on my site.
I'd like to see that in action. Please post a link and non-admin test user account if you're convinced that your suggestion does work. I find it hard to believe though: in keyword_select.php, the target form field ID is hard-coded to "keywords". However, in editpics.php, the form fields don't have an ID and the name is "keywordsXXX" (where XXX corresponds to the PID).
I understand that your suggested code change displays the words "Keywords (separate with spaces) Insert from list" instead of just displaying the word "keywords". However, when clicking on the "insert from list" link and after the pop-up (keyword_select.php) shows up, nothing will happen when you click on individual keywords (i.e. the selected keywords will not appear within the form field in editpics.php). That's why I suggested that your suggestion is invalid, as it would introduce a feature that would not work. The changes I had to apply in cpg1.5.x are manifold, you're free to check out the SVN repository to find out what needs changing.

And I can explain my I called this one a bug. When one future/process/idea is broken (I speak about inserting from list), then from my opinion it is a bug.
A bug is something that is suppossed to work, but doesn't (or doesn't work in the expected way). Yours is an additional feature suggestion, not a bug. That's how we (the coppermine dev team members) define the word "bug" as well as all other similar projects that I'm aware of. If you have another definition for the word "bug", then fine. But on this board, please use the word "bug" as we define it. Shouting "bug" actually means accusing the developers to have made a mistake. Of course we make mistakes as well, that's why there are actual bugs. However, yours is not a genuine bug, but a missing feature.

Joachim
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
Re: [BUG] Edit file information - Keywords
« Reply #7 on: July 06, 2007, 12:51:39 pm »

I'd like to see that in action. Please post a link and non-admin test user account if you're convinced that your suggestion does work. I find it hard to believe though: in keyword_select.php, the target form field ID is hard-coded to "keywords". However, in editpics.php, the form fields don't have an ID and the name is "keywordsXXX" (where XXX corresponds to the PID).
PM is in your box.

I understand that your suggested code change displays the words "Keywords (separate with spaces) Insert from list" instead of just displaying the word "keywords". However, when clicking on the "insert from list" link and after the pop-up (keyword_select.php) shows up, nothing will happen when you click on individual keywords (i.e. the selected keywords will not appear within the form field in editpics.php). That's why I suggested that your suggestion is invalid, as it would introduce a feature that would not work. The changes I had to apply in cpg1.5.x are manifold, you're free to check out the SVN repository to find out what needs changing.
A bug is something that is suppossed to work, but doesn't (or doesn't work in the expected way). Yours is an additional feature suggestion, not a bug. That's how we (the coppermine dev team members) define the word "bug" as well as all other similar projects that I'm aware of. If you have another definition for the word "bug", then fine. But on this board, please use the word "bug" as we define it. Shouting "bug" actually means accusing the developers to have made a mistake. Of course we make mistakes as well, that's why there are actual bugs. However, yours is not a genuine bug, but a missing feature.

Joachim, I understand mechanism of how "Insert from list" works you are talking about. I understand about form fields, id and etc.
I think "we" are just hostages to browsers' "hard" coded mechanism.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [BUG] Edit file information - Keywords
« Reply #8 on: July 06, 2007, 07:17:43 pm »

OK, I went to your site and tried:
Inserting keywords from the list works as expected when editing a single file (e.g. http://makc666.com/gallery/editOnePic.php?id=5&what=picture). However, as I suggested above, it doesn't work when going to editpics.php (e.g. http://makc666.com/gallery/editpics.php?album=2). That's why your suggestion to add the string to the language section for editpics.php is invalid. Proven on your own page.
Issue settled for me - your suggestion stays invalid: if we added it, it would allow users to insert keywords from the list when editing one single file (editOnePic.php). However (as the same translation string is being used for both files), the link "insert from list" would show as well when editing several pics (editpics.php), although clicking on the list wouldn't do anything. That's why we can't add it to the core. Prove me wrong if you can. Unless you can, your request is invalid and stays invalid.

When you edit any image, for example:
http://makc666.com/gallery/editOnePic.php?id=4&what=picture

and there are already Keywords blue hills.

So when you ckick on Insert from list and will try to insert words, you have to remember that you will not be able to insert blue hills again from that list. Only other words.
expected behaviour. Actually, it's a feature.

Works in IE6, IE7, Opera 9.*.
Doesn't work is in FireFox and Safari.
Can't say anything about Safari, as I don't own a Mac. However, the behaviour I explained above is browser independant.

FireFox displays those errors you were talking about.
I didn't say anything about error messages. It's just that nothing happens no matter what browser you use on editpics.php, simpy because the JavaScript from keyword_select.php tries to write a value into a form field that doesn't exist. Try it. If something happens for you, using IE or Opera, then you must be able to do magic.

Joachim
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
Re: [BUG] Edit file information - Keywords
« Reply #9 on: July 10, 2007, 03:49:57 pm »

OK, I went to your site and tried:
Inserting keywords from the list works as expected when editing a single file (e.g. http://test.com/gallery/editOnePic.php?id=5&what=picture). However, as I suggested above, it doesn't work when going to editpics.php (e.g. http://test.com/gallery/editpics.php?album=2). That's why your suggestion to add the string to the language section for editpics.php is invalid. Proven on your own page.
Yes. My bad. I didn't test it on editpics.php :(

Issue settled for me - your suggestion stays invalid: if we added it, it would allow users to insert keywords from the list when editing one single file (editOnePic.php). However (as the same translation string is being used for both files), the link "insert from list" would show as well when editing several pics (editpics.php), although clicking on the list wouldn't do anything. That's why we can't add it to the core. Prove me wrong if you can. Unless you can, your request is invalid and stays invalid.
expected behaviour. Actually, it's a feature.
Now I understand the core "problem" of my fix. I agree with you that it is invalid! Once again it is my bad.

Can't say anything about Safari, as I don't own a Mac. However, the behaviour I explained above is browser independant.
I also don't have Mac :D
I was speaking about Apple's Safari for Windows! -> http://www.apple.com/safari/download/

I didn't say anything about error messages. It's just that nothing happens no matter what browser you use on editpics.php, simpy because the JavaScript from keyword_select.php tries to write a value into a form field that doesn't exist. Try it. If something happens for you, using IE or Opera, then you must be able to do magic.

Joachim
Magic failed on editpics.php :( Need a ticket to Hogwarts! :P
Logged
Pages: [1]   Go Up
 

Page created in 0.052 seconds with 19 queries.