简体   繁体   中英

Gallery3 - reload a page after save is broken

I'm looking for someone who really knows a lot about the PHP code of Gallery3. Unfortunately, the support forum Gallery3 is locked. In spare forum no one could help.

My Gallery3 has many adjustments in the PHP code/Javascript. In addition, I have the Responsive Theme that was released as incomplete. I have fixed it, but only for my Gallery, not in general. Which reminds me but a mistake is made, I'm looking for now. The proposal to make everything undone, I can not accept unfortunately. I would have to if then start all over again. This would mean that more than 100 hours of work were in vain. I am not a professional in PHP/Javascript. I do everything in my leisure time.

I'm seeking a very specific point in the PHP/Javascript code Gallery3. It is the place that is responsible for the "reload page after edit a album/photo page".

The Problem: A saving for an edited album/photo page in frontend lightbox is directed to a blank page with the entry (example for main page):

{"result":"success","location":"/"}

and the URL:

example.com/gallery3/albums/update/1

and not reloaded to the album/photo page. But "save" is working.

Therefore my question is: In what file and where in the code is the function to find the "reload function"?

PS: Please only really helpful hints, no clever spells.

PHP: 5.5.9 Gallery: 3.0.9

EDIT --- NEW INFO:

I have yet install on a test-server a brand new Gallery3 with the Responsive Theme. This fresh installation have the same problem. I have testet both themes (Default/Responsiv) yet with the Firefox/Chrome developer tools. The test-result:

The "Request URL" is false. (???)

Default Theme Request URL: http://www.example.com/index.php/test/photo001 (with page-reload)

Responsiv Theme Request URL: http://www.example.com/index.php/photos/update/3 (without page-reload)

The Responsive Theme: https://github.com/deanstalker/Gallery3BootstrapResponsive/blob/master/js/gallery.dialog.js

Where to find the error?

I found these file entrys:

For the (false) reload URL:

./modules/gallery/helpers/photo.php: $form = new Forge("photos/update/$photo->id", "", "post", array("id" => "g-edit-photo-form"));

./modules/gallery/helpers/album.php: "albums/update/{$parent->id}", "", "post", array("id" => "g-edit-album-form"));

./modules/gallery/helpers/movie.php: $form = new Forge("movies/update/$movie->id", "", "post", array("id" => "g-edit-movie-form"));

./modules/user/controllers/users.php: $form = new Forge("users/update/$user->id", "", "post", array("id" => "g-edit-user-form"));

For the (false) blank page entry:

./modules/gallery/controllers/quick.php: json::reply(array("result" => "success", "location" => $parent->url()));

./modules/gallery/controllers/movies.php: json::reply(array("result" => "success", "location" => $movie->url()));

./modules/gallery/controllers/photos.php: json::reply(array("result" => "success", "location" => $photo->url()));

./modules/gallery/controllers/albums.php: json::reply(array("result" => "success", "location" => $album->url()));

./modules/gallery/controllers/albums.php: json::reply(array("result" => "success", "location" => $album->url()));

./modules/watermark/controllers/admin_watermarks.php: json::reply(array("result" => "success", "location" => url::site("admin/watermarks")));

./modules/watermark/controllers/admin_watermarks.php: json::reply(array("result" => "success", "location" => url::site("admin/watermarks")));

./modules/tag/controllers/admin_tags.php: json::reply(array("result" => "success", "location" => url::site("admin/tags")));

./modules/tag/controllers/admin_tags.php: json::reply(array("result" => "success", "location" => url::site("admin/tags")));

https://github.com/gallery/gallery3

I started on this theme a few years ago and have since abandoned it due to lack of time and motivation to maintain the project.

I came across quite a few hurdles due to the tight coupling of the view and app layer; as well as the heavy reliance on jQuery UI.

Gallery3 left a bad taste due to poor execution and implementation. It has worked out easier to host on flickr and feed in photos via API calls.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM