Gossamer Forum
Home : Products : DBMan : Customization :

MajoR Bug - Image Upload MOD

 
MajoR Bug - Image Upload MOD
Hello, Smile


I have downloaded and installed Image Upload mod (single) script from
Gossamer Threads Community, and after configuring it and setting
up the script, I found a major bug with images that are being
uploaded.

When perform following action/s, bug occurs:

1. Add first record in database, with ID = 1, choosing an image
to that record as well.

/ This works fine. When I choose Show All Records from the menu,
that record is displayed well and without any problems./


2. Continue to Add all records until you reach ID = 11.

/ when this record with an image is added, after choosing
show all records, in the first record that is added, that is record 1,
there are two images displayed, one for the record 1 and other
for the record 11. But At the record number 11 there is only one
image./

/ my conclusion is that the record cannot make difference between
records of type:

1 and 11
2 and 22
3 and 33

etc..

What I wondering is:

- Where is this function of displaying of the record performed?

- and Is there a way to check that in html.pl before displaying
an image or is it located in db.cgi ?


If you have any clues why this is occurring, please e-mail me.


Regards & Thank You in Advance,


/Vildan Cool


Thank You In Advance!

Regards,

[vildan]

Last edited by:

vildan: Jan 17, 2002, 4:33 AM
 
Re: [[morpheous]] MajoR Bug - Image Upload MOD In reply to
It is a good habit when using a mod to always check for related threads to see if there are any updates or fixes.

There are several fixes for the upload mod in the FAQ noted below.

Search for this thread either in the forum or the FAQ for a fix to the problem you are having.

Thread reference: http://gossamer-threads.com/p/92667
Subject: File Upload Problems
RBilger - 7-Jul-00

If the url is not the correct one, search by the Subject.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
 
Re: [LoisC] ] MajoR Bug - Image Upload MOD In reply to
Hi,


Thanx on your reply.

but this won't help. this issue is directly binded to Image MOD and is internally about linking objects/files on the server to current database.

- problem is in reading files into database.

it looks like the database can't make the difference between number ID 1 and ID 11 or 111 or 1111.

this is explictly Image MOD problem! - not DBMan.

So far...I am unable to find any concrete answers to my question.

My files are attached for close look. Files are only modified necessarily.

My thanx to anybody who finds enough time to look this up, and fix these problems once for all.
`


Thank You In Advance!

Regards,

[vildan]
 
Re: [vildan] ] MajoR Bug - Image Upload MOD In reply to
Yes, and the thread reference I provided is for the specific problem you are having. It posted the code changes necessary to distinguish between the single and double digit record id numbers.

Did you even view the thread or visit the FAQ and check the references under "Images"?

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
 
Re: [LoisC] ] MajoR Bug - Image Upload MOD In reply to
hi,


it looks like I got the wrong links...


/Vildan


Thank You In Advance!

Regards,

[vildan]
 
Re: [vildan] ] MajoR Bug - Image Upload MOD In reply to
It looks like the post number was transposed. Instead of: Thread reference: http://gossamer-threads.com/p/92667
It should be Thread reference: http://gossamer-threads.com/p/92677

~ Karen
 
Re: [Karen] ] MajoR Bug - Image Upload MOD In reply to
I do realize that some of the urls in the FAQ are no longer valid. This is why I always include the full thread reference and state that if the url is not correct to search by the subject of topic of the thread.

It would take months to have to search and update all the old thread references. That is why I usually only reference the FAQ and mention the category and thread title :)

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
 
PROBLEM SOLVED! MajoR Bug - Image Upload MOD In reply to
PROBLEM SOLVED!


ehh...thanx everybody!
especially to this Forum and to dedicated people - who replied to me (both e-mail and forum)- you know who you are. - love'yaWink

The problem Solution:

Image MOD is filled with small errors.


If you install your Image MOD using documentation you will install a small piece of code
which is used for displaying records/images in html.pl file.

- Find subroutine sub html_record {

- Find the piece of code that starts with:

Code:
|; # to close off a previous print qq| statement
opendir (GRAPHIC, "$SAVE_DIRECTORY")
Code:
closedir (GRAPHIC);
And exchange everything between that line and print qq| statement with (but not that line!):
Code:
Code:

$file_test = $rec{$db_key};
foreach $file (@files) {
if ($file =~ /^$file_test\./) {
print qq|<img src= "$SAVE_DIRECTORY_URL/$file">|;
$graphic_found=1;
}
}


Wink I Need somebody to update IMAGE MOD with this code !!!



Once again,

Thanx everybody!


Thank You In Advance!

Regards,

[vildan]

Last edited by:

vildan: Jan 18, 2002, 11:13 AM
 
Re: [vildan] PROBLEM SOLVED! MajoR Bug - Image Upload MOD In reply to
Part of it is still wrong. $ is a meta-character in regex so if you just insert it as part of a variable name it won't give the correct results.

Change:

if ($file =~ /^$file_test\./) {

to:

if ($file =~ /^\Q$file_test.\E/) {
 
Re: [RedRum] PROBLEM SOLVED! MajoR Bug - Image Upload MOD In reply to
hi,Cool

I have tested previous code and it works fine.
If I come into more troubles later, I will implement the code below. thanx [:-)]


Thank You In Advance!

Regards,

[vildan]
 
Re: [vildan] PROBLEM SOLVED! MajoR Bug - Image Upload MOD In reply to
You shouldn't implement it later when you run into trouble...thats not a good way to do things.

Ah well it's up to you I guess.
 
Re: [RedRum] PROBLEM SOLVED! MajoR Bug - Image Upload MOD In reply to
Hey! Good Idea!

I am following an "Learing by experiencing and correcting Faults" example...

I have made the suggested changes.

-Script tested and working!

Cool Best Regards to all of the Gossamer Threads Forum crew :-)


Thank You In Advance!

Regards,

[vildan]