This topic was marked solved by Nao, on July 25th, 2017, 07:32 PM
[AeMe] The database value you're trying to insert does not exist: id_file

Pandos

  • Living on the edge of Wedge
  • Posts: 635
[AeMe] The database value you're trying to insert does not exist: id_file
« on February 5th, 2014, 02:12 AM »

After changing symbol of my gallery folder and reuploaded another image:

The database value you're trying to insert does not exist: id_file
Function: aeva_resetTransparency
 File: /usr/local/var/www/gz/app/media_Subs-Media.php
Line: 3590

Pictures still there but not accessible
# dpkg-reconfigure brain
error: brain is not installed or configured

Nao

  • Dadman with a boy
  • Posts: 16,063

Pandos

  • Living on the edge of Wedge
  • Posts: 635

Nao

  • Dadman with a boy
  • Posts: 16,063

Pandos

  • Living on the edge of Wedge
  • Posts: 635

Nao

  • Dadman with a boy
  • Posts: 16,063

Pandos

  • Living on the edge of Wedge
  • Posts: 635
[AeMe] Re: The database value you're trying to insert does not exist: id_file
« Reply #6, on February 5th, 2014, 11:22 AM »
It's only one album.
So I tracked it down:
It was: for the first album. Error occures when I tried to change the icon. It gives me error 500 (see other post).
So I came to the conclusion that it updated the table with the new file but can't find it.
I'll play a bit in db to get it to work again.
Will report.

Nao

  • Dadman with a boy
  • Posts: 16,063
[AeMe] Re: The database value you're trying to insert does not exist: id_file
« Reply #7, on February 5th, 2014, 11:32 AM »
Thanks. All of the forums I did my testing on were imported. The last test forum I installed from scratch I removed yesterday. :(
Hopefully you can find out what's wrong.

Don't forget that db_aeva.sql (from the AeMe package at SMF) was never imported into Wedge, and as such there may be things missing.
I know that all generic icons except for the big 4 are missing. :-/

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,668
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

Franky

  • Posts: 16

CerealGuy

  • Posts: 343
[AeMe] Re: The database value you're trying to insert does not exist: id_file
« Reply #10, on April 11th, 2016, 09:03 AM »Last edited on April 11th, 2016, 09:11 AM
Quote from Franky on April 3rd, 2016, 05:15 AM
Although the issue is so old. The bug is still. I could solve it for SMF and for Wedge.

SMF
Aeva-Subs.php (Version 2.10) line 3721
Code: [Select]
WHERE id_file = {int:id_file}',
change to
Code: [Select]
WHERE id_file = id_file',

Wedge
Subs-Media.php line 3600
Code: [Select]
WHERE id_file = {int:id_file}',
change to
Code: [Select]
WHERE id_file = id_file',
Even if it's just some small changes, would you mind to make a pull request or push it on github?
The reason behind this is that I think we have bigger chances that those fixes get merged into the main branch if we make as little work for Nao as possible and it would be easier to keep track of the bugs and its fixes/changes.

PS: I actually don't think that this fixes the real problem, because with replacing {int:id_file} the argument to the query doesn't get insert any more. So maybe you have no error any more, but maybe the query is now doing nothing any more too.

Franky

  • Posts: 16
[AeMe] Re: The database value you're trying to insert does not exist: id_file
« Reply #12, on April 13th, 2016, 07:38 AM »
Have now the source identified that causes the bug. It is the function of the aeva media gallery.:
Quote
Added transparency flag to pictures, and functions to determine transparency
This is the error message:
Quote
The database value you're trying to insert does not exist: id_file
Function: aeva_resetTransparency
The value id_file but is available, see attachment database_transparency.JPG

 database_transparency.JPG - 169.63 kB, 1447x657, viewed 48 times.


CerealGuy

  • Posts: 343
[AeMe] Re: The database value you're trying to insert does not exist: id_file
« Reply #13, on April 23rd, 2016, 01:33 PM »
Try to debug it, check what's the content of $id_file by inserting something like
Code: [Select]
log_error($id_file);
before the query gets fired. And then check your error logs in the wedge acp. You should get some number(s). If you only get empty errors, there is something wrong with how the function gets executed, if you get a numer, there is something wrong with the query/db part.

Franky

  • Posts: 16
[AeMe] Re: The database value you're trying to insert does not exist: id_file
« Reply #14, on April 23rd, 2016, 03:39 PM »
Thanks ^_^ , I will try.
The error comes only with version 2.10 with the introduction of the function transparency flag to pictures.
Quote
New with 2.10  Added transparency flag to pictures, and functions to determine transparency