[BUG] Edit file information - Keywords [BUG] Edit file information - Keywords
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[BUG] Edit file information - Keywords

Started by Makc666, July 04, 2007, 12:06:21 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Makc666

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


In english.php this is line:
'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.4
of section:
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:
'keywords' => 'Keywords',
of section:
if (defined('EDITPICS_PHP')) $lang_editpics_php = array(

Screen shot #2



To fix this one we have just to change line:
'keywords' => 'Keywords',
of section:
if (defined('EDITPICS_PHP')) $lang_editpics_php = array(

to line:
'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

Singular

Hey thanks. I was wondering about this issue.

Joachim Müller

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

Joachim Müller

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 ... ::)

Joachim Müller

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.

Makc666

Quote from: GauGau 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 ... ::)
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

Joachim Müller

Quote from: Makc666 on July 05, 2007, 11:48:26 PM
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.

Quote from: Makc666 on July 05, 2007, 11:48:26 PM
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

Makc666

Quote from: GauGau on July 06, 2007, 09:52:48 AM
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.

Quote from: GauGau on July 06, 2007, 09:52:48 AM
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.

Joachim Müller

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.

Quote from: Makc666 on July 06, 2007, 12:52:40 PM
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.

Quote from: Makc666 on July 06, 2007, 12:52:40 PMWorks 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.

Quote from: Makc666 on July 06, 2007, 12:52:40 PMFireFox 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

Makc666

Quote from: GauGau 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://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 :(

Quote from: GauGau on July 06, 2007, 07:17:43 PM
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.

Quote from: GauGau on July 06, 2007, 07:17:43 PM
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/

Quote from: GauGau on July 06, 2007, 07:17:43 PM
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