4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: djavet on July 26, 2007, 10:20:54 AM

Title: Additional field dont save in validation tool
Post by: djavet on July 26, 2007, 10:20:54 AM
Hello

I've udated to 1.7.4 right now and I've an additionnal text field on the upload page.
My additional field doesnt come to the validation screen and when I validate, the field in DB are empty! But when I correct the field via the image edit page, no problem, it's save well.
Before I update3, all was working well. Any idea what is wrong with the validating tool and the additional field?

A lot of thx for your feedback.

Dom
Title: Re: Additional field dont save in validation tool
Post by: djavet on July 30, 2007, 06:49:18 AM
Any idea?

Dom
Title: Re: Additional field dont save in validation tool
Post by: thunderstrike on August 01, 2007, 03:05:34 AM
Is $additional_sql declare from SQL select in upload page ?
Title: Re: Additional field dont save in validation tool
Post by: djavet on August 02, 2007, 08:11:13 PM
Thx for your help.
Nope it's not declared. How can I make it?

Dom
Title: Re: Additional field dont save in validation tool
Post by: thunderstrike on August 02, 2007, 09:56:46 PM
Quote
How can I make it?

Hard knowing when no action name post. Template and PHP file where is happend ?
Title: Re: Additional field dont save in validation tool
Post by: djavet on August 03, 2007, 06:33:56 AM
Hello

I think it's in the php, because all was working well with my old portfolio.
But i'm not good in PHP  :cry:

So if someone could help, i will be glad and thankfull.

Regards, Dom
Title: Re: Additional field dont save in validation tool
Post by: djavet on August 03, 2007, 06:43:29 AM
I found something interesting.
In the control panel, my custom field was not visible in validateimage.php, when I check the image before validate.

Any path?

Dom
Title: Re: Additional field dont save in validation tool
Post by: thunderstrike on August 03, 2007, 12:19:12 PM
Quote
Any path?

Add field in includes/db_field_definitions.php file ?
Title: Re: Additional field dont save in validation tool
Post by: djavet on August 03, 2007, 01:39:05 PM
Done, because when I edit the image in the normal way, my custom field are here, but when I validate the image, the field is not here...
Strange...
Any idea?

Dom
Title: Re: Additional field dont save in validation tool
Post by: thunderstrike on August 03, 2007, 02:01:05 PM
Add the tag field and lang in template file ?
Title: Re: Additional field dont save in validation tool
Post by: djavet on August 03, 2007, 02:08:56 PM
Yope, and the funny things are:
- in edit mode, it's working!

Exemple: validate a images (I loose the custom field), I edit the field and add manually the content and save and ... tada ... the custom field are here and updated!
I think is something misseng with the upload process or the validating tool... But I'm not a php developper...

Dom
Title: Re: Additional field dont save in validation tool
Post by: thunderstrike on August 03, 2007, 02:17:51 PM
Quote
I think is something misseng with the upload process or the validating tool... But I'm not a php developper...

Like say before ... which file & action happend ?
Title: Re: Additional field dont save in validation tool
Post by: djavet on August 03, 2007, 02:49:14 PM
>> validateimage.php when I check the image to validate don't show the custom file.

Dom
Title: Re: Additional field dont save in validation tool
Post by: thunderstrike on August 03, 2007, 02:53:27 PM
Which array name use on db_field_definition.php file ? Please post complete line . .
Title: Re: Additional field dont save in validation tool
Post by: djavet on August 03, 2007, 03:02:02 PM

in "db_field_definitions.php":
$additional_image_fields['image_uploaduser'] = array($lang['image_uploaduser'], "text", 0);

in "/lang/english/main.php":
$lang['image_uploaduser'] = "Name or Nickname:";

And I've added the fields in DB as requested for the upload too.

Thx for your help.
Dominique
Title: Re: Additional field dont save in validation tool
Post by: thunderstrike on August 03, 2007, 05:18:16 PM
Quote
image_uploaduser

Add to member upload template file ?
Title: Re: Additional field dont save in validation tool
Post by: djavet on August 04, 2007, 01:57:23 PM
Yes.
My live and productive site:
http://www.john-howe.com/portfolio/gallery/member.php?action=uploadform&cat_id=40

Dom
Title: Re: Additional field dont save in validation tool
Post by: thunderstrike on August 04, 2007, 02:06:33 PM
What added in member template file for name nickname ? (original block - no view source) ...
Title: Re: Additional field dont save in validation tool
Post by: djavet on August 06, 2007, 09:02:02 AM
It's not a the 4images member's name.
it's a another name, a artist name for the open contest. So it's a custom field.

Dom
Title: Re: Additional field dont save in validation tool
Post by: thunderstrike on August 06, 2007, 02:40:57 PM
Quote
it's a another name, a artist name for the open contest. So it's a custom field.

Ah ! so a custom field image ? Wich to have show artist field for image after upload (details) - correct ?
Title: Re: Additional field dont save in validation tool
Post by: djavet on August 06, 2007, 03:00:33 PM
Exactly.

dom
Title: Re: Additional field dont save in validation tool
Post by: thunderstrike on August 06, 2007, 03:14:33 PM
What code added in your member upload template file ?
Title: Re: Additional field dont save in validation tool
Post by: djavet on August 06, 2007, 03:48:39 PM
Here's the code:
Code: [Select]
          <tr>
            <td class="row2"><b>{lang_image_uploaduser}</b></td>
            <td class="row2"><input type="text" name="image_uploaduser"  size="30" value="{image_uploaduser}" class="input" /></td>
          </tr>
Title: Re: Additional field dont save in validation tool
Post by: thunderstrike on August 06, 2007, 04:37:05 PM
Ok, so what structure SQL DB field for image_uploaduser create in phpmyadmin (IMAGES_TABLE) ?
Title: Re: Additional field dont save in validation tool
Post by: djavet on August 06, 2007, 07:27:36 PM
In table 4images_images, i've added:
image_uploaduser      varchar(255)     No

and in 4images_images_temp, same:
image_uploaduser      varchar(255)     No

Once again, all is working when I edit the validated images, but not in the validating process.

BTW, thx once for your help and time.

Regards, Dom
Title: Re: Additional field dont save in validation tool
Post by: thunderstrike on August 06, 2007, 10:19:24 PM
If can PM me, I give email address and send server info there ... will take look myself. ;)
Title: Re: Additional field dont save in validation tool
Post by: djavet on August 07, 2007, 04:20:44 PM
So any other ideas?

Dom
Title: Re: Additional field dont save in validation tool
Post by: thunderstrike on August 07, 2007, 04:23:38 PM
I ... just posted answer above. :?

Im understand this is another no update reply topic ?
Title: Re: Additional field dont save in validation tool
Post by: djavet on August 07, 2007, 04:57:06 PM
Thx, but you dont give an answer, only a proposition to charge me to fix the problem and not give the solution to the community.
Like we have discussed this per PM, I'm not agree with your proposition.

I'm always thinking it's a little bug.

Dom
Title: Re: Additional field dont save in validation tool
Post by: thunderstrike on August 07, 2007, 06:42:52 PM
PM reply. You did not post quote. I thought you were a other user ... next time - pleasse post quote.
Title: Re: Additional field dont save in validation tool
Post by: olgaart on July 15, 2009, 06:20:00 PM
 if (!empty($additional_image_fields)) {
            $table_fields = $site_db->get_table_fields(IMAGES_TABLE);
            foreach ($additional_image_fields as $key2 => $val2) {
              if (isset($image_cache[$key][$key2]) && isset($image_cache[$key][$key2])) {
                $additional_field_sql .= ", $key2";
                $additional_value_sql .= ", '".addslashes($image_cache[$key][$key2])."'";
              }
            }
          }


Change IMAGES_TABLE to :    IMAGES_TEMP_TABLE