Strange behaviour in related tab
Posted: Mon Dec 07, 2009 11:23 am
Hi, I'm setting up a back-end for an image gallery site. It is simply composed of photos and photo galleries, each in one table (namely, photos and galleries).
The photos table has an FK to the galleries table via a field "gallery_id", so I wrote this relationships.ini file in the tables/galleries folder:
So the photos tab appears inside the details of a gallery record, but if I do the following from there:
1. click the photos tab
2. click the link named "Add New Photos Record"
3. fill in the photo fields (one is an image which will be stored on disk; the photo and photo_mimetype fields exist and seem to be ok)
4. save the new photo record
...then I'm directed to the photos tab again, but this time it will display "No records matched your request." instead of the table of photos and the left and right arrows for the details view have disappeared. The new photo record was created, though.
A few images to illustrate the situation:
1. before editing >> http://picasaweb.google.com/jforns/Xata ... 3973914978
2. during editing >> http://picasaweb.google.com/jforns/Xata ... 3238544466
3. result >> http://picasaweb.google.com/jforns/Xata ... 7219662514
Also, if I click on the "edit" tab, I can edit the "bodas" gallery record, but if I click on the "photos" tab again (without saving the gallery), it still shows empty.
BTW, as you can see from the screen shots, a "Save" button appears in each fieldgroup, when just a single Save button should appear at the bottom of the form.
I guess this is a bug, but maybe I'm doing something wrong... Steve?
Rgds, J.
The photos table has an FK to the galleries table via a field "gallery_id", so I wrote this relationships.ini file in the tables/galleries folder:
- Code: Select all
[photos]
photos.gallery_id = "$id"
So the photos tab appears inside the details of a gallery record, but if I do the following from there:
1. click the photos tab
2. click the link named "Add New Photos Record"
3. fill in the photo fields (one is an image which will be stored on disk; the photo and photo_mimetype fields exist and seem to be ok)
4. save the new photo record
...then I'm directed to the photos tab again, but this time it will display "No records matched your request." instead of the table of photos and the left and right arrows for the details view have disappeared. The new photo record was created, though.
A few images to illustrate the situation:
1. before editing >> http://picasaweb.google.com/jforns/Xata ... 3973914978
2. during editing >> http://picasaweb.google.com/jforns/Xata ... 3238544466
3. result >> http://picasaweb.google.com/jforns/Xata ... 7219662514
Also, if I click on the "edit" tab, I can edit the "bodas" gallery record, but if I click on the "photos" tab again (without saving the gallery), it still shows empty.
BTW, as you can see from the screen shots, a "Save" button appears in each fieldgroup, when just a single Save button should appear at the bottom of the form.
I guess this is a bug, but maybe I'm doing something wrong... Steve?
Rgds, J.