Page 1 of 1
Possible Bug: duplicate datarecord when using image twice
Posted: 28 Aug 2009, 13:22
by H0shi
If you create a new datarecord and use an image, which is already used in the gallery, then the new dataset is saved twice.
Please see the screenshot.
#15 "test 1" is the first entry
#16 "test 2" is the second entry
#17 "test 2" is the doubled entry
Someone has a solution for this?
Thanks in advance!
H0shi
Re: Possible Bug: duplicate datarecord when using image twice
Posted: 28 Aug 2009, 18:35
by Jan
Hi, as the same image can be saved in different categories with different names this is OK. Phoca Gallery use database and filesystem layer which is not the same, so image stored on your server can be added into more categories and can have other name too.
Jan
Re: Possible Bug: duplicate datarecord when using image twice
Posted: 31 Aug 2009, 10:13
by H0shi
Good morning Jan,
thanks for your prompt answer!
I think you slightly missed the point.
Again the steps to the Bug:
1. Create an Image recordset and upload an Image to the Gallery
2. then create another recordset, but instead of uploading another new image, use the image uploaded in step 1.
The result should be two different recordsets with the same picture.
But the actual result is: three recordsets! The one created in step 1 and the second recordset is written twice in the database.
I hope my description was not too abstract...
Re: Possible Bug: duplicate datarecord when using image twice
Posted: 24 Sep 2009, 16:57
by Jan
Hi, thank you for this information, now I see it. I confirm, it is a bug. There is an obsolete code in:
administrator\components\com_phocagallery\controllers\phocagallery.php
on line cca 133:
This code should be commented, FROM:
Code: Select all
if ($model->store($post)) {
$msg = JText::_( 'Phoca gallery Saved' );
} else {
$msg = JText::_( 'Error Saving Phoca gallery' );
}
TO:
Code: Select all
/* if ($model->store($post)) {
$msg = JText::_( 'Phoca gallery Saved' );
} else {
$msg = JText::_( 'Error Saving Phoca gallery' );
}*/
for now. I will fix it in the next release.
Thank you, Jan