*SOLVED*
Hello, I have been working on some modifications to Gallery2 Beta2. I know and realize that there is a Beta 3 available at this time, but after having put so much time into getting this particular version modified to the current state it is in now, I am not quite ready to chance having to remodify everything.
Anyways, on to the problem I am experiencing.
I have gone through and modified the albumBody.tpl for the matrix layout, so that the dropdown menus are replaced with text links and images. I have also made similar modifications to the ViewCart.tpl files. Everything is being displayed correctly and functioning the way it should, with the exception of the breadcrumb function.
When I click to add an item to the cart, the view cart page is accessed, but there is no information, links or any content related to the navigation whatsoever. The entire sidebar area just shows up as a blank void. If the update cart or empty cart buttons are clicked, the page of course updates itself and lists the back to viewcart page and other navigation info. I have gone through the modifications I made and have tried to determine what coudl be causing this, but I have come up empty handed and confused.
Also, not sure if this will help in assessing the problem, but if items or even the album itself is added to the cart by means of clicking the add to cart option from within the sidebar, the sidebar shows up correctly.
Also, one more strange breadcrumb behavior I have noticed is that before the modifications were made, when viewing subalbums, the main album name as well as the current album name was displayed in the pathbar area, and were displayed as links. Now, when dropping into a subalbum or any other page, only the main home album is shown as a link at the top, and the other items listed are just plain text.
Has anyone else experienced anything like this, or do you possibly know how I might go about correcting these problems. I have checked, rechecked and checked again to make sure that nothing related to the breadcrumb was disturbed when these pages were modified, and I have spent countless hours searching through these forums in hope of finding some sort of solution. I pray that someone here can help me out, as I cannot afford many more sleepless nights due to this, LOL.
Posts: 7
*BUMP*
am bumping this in hopes of getting an answer or some help this time around. Also, to update the situation, I have gone ahead and updated to beta v 3 and the problem with the breadcrumb still exists.
any idea why the breadcrumb is not being passed along when the page is transfered to the cart? Has anyone else experienced this sort of problem?
Amy
Posts: 16503
Try changing the theme and layout back to a default theme and layout that ships with Gallery?
Posts: 7
the breadcrumb functions normally when changed back to previous state before modifications were made. I just would like to find a workable solution that will allow for the modifications, and keep the breadcrumb function working normally as well.
I just dont understand how the small modification to that drop down menu could cause this behavior of the pathbar and breadcrumb. Oh well..will keep researching and trying different approaches on this end, and pray that someone else along the lines has encountered and solved the same sort of problem.
Posts: 16503
The only thing I can think of that breaks these kinds of things are typos or incorrect syntax.
Can you post a link to your site using your layout as you have modified it along with a list of the files you've modified?
Also post exactly which version of Gallery you're using. You can get this in:
Site Admin > Maintenance > System Information
Example: Gallery version = 2.0-beta-3+ core 0.9.22
Posts: 7
Hey, I am using Gallery version = 2.0-beta-3 core 0.9.17
the files I have modified, oy ve! there are several. let me see if I can recall them all to list them.
layouts/matrix/templates/albumBody.tpl (replaced drop down forms with image links and dropped unneccesary info, ie-views, owner, etc -these are not needed by me)
modules/cart/ViewCart.tpl (replaced drop down form again, and dropped the info that was unnecesary for me, ie title, summary, etc)
modules/cart/module.inc (modified the viewcart link portion so that an image link is shown in place of text)
and last but not least:
modules/checkout/templates/SelectProducts.tpl
modules/checkout/templates/ConfirmPhotos.tpl (dropped the title/summary and info feilds from these forms to go along with the modifications to cart)
of course these modifications are probably useless or not needed by most, but I wanted to do all I could to make the gallery more user friendly. It seems that most, regardless of how simple it really is, if they dont have a bold image link telling them plainly what to do, they just wont get it, LOL.
I am sure there are mistakes as this is really the first open source code I have ever taken a hack at. I am really just now getting into learning PHP, so please be forgiving of any/all mistakes you see.
Posts: 7
also, in refference to what was causing the breadcrumb to not function properly, I was using a previously modified albumBody.tpl file that was created by Stuart of petalsphotography.com .
After checking through various files within gallery, I realized that there needed to be an additional argument passed along, for the return link. DUH ME! simple fix really, it just took me forever to find it.
Posts: 431
I noticed you are using the PayPal checkout module (based on the fact you have modules/checkout/templates/ConfirmPhotos.tpl and so on).
There was a bug in the version that uses those file names that caused the breadcrumb not to be shown. It's been fixed in the newer versions (have a look around about page 4 on the original PayPal checkout thread), but if you installed there you'd probably have to re-do your mods.
To help, I think that the problem was being caused by a copy-and-paste in ConfirmPhotos.tpl that hadn't been fixed to the correct variable names. I seem to remember it was right up the top, and it was looking for something like '$SelectSizes.rootAlbum.title', which should have been '$ConfirmPhotos.rootAlbum.title'.
I know that doesn't help with the main cart module, but it's hopefully one small problem sorted! I'd recommend you have a quick look at the change log for the checkout module (in the readme, here) to see what other problems have been found and fixed.
Posts: 16503
I take it you fixed the majority of your problem then? If you problem is fixed please go back your your original post, edit it and append [SOLVED] to the beginning of the subject.
One thing you may want to do in the future is create a local directory under any of the templates directories where you modify files. Then copy the files you modified or are going to modify in there. Gallery looks there first for files, if they exist it uses them. However, Gallery doesn't ship with any of those files so it can never overwrite them when you upgrade. This way it's easier to upgrade Gallery and retain your customizations. Esspecially when a developer asks you to upgrade to the latest version or CVS because a problem may be having has been fixed.
However, this doesn't work for .inc or .class files and I think a few others like .js files (dtree)
Another thing to make note of is that Gallery 2 is still in Beta, things may change. Do not depend on it for a production site unless you are o.k. with an upgrade possibly breaking everything. Always backup your existing install, g2data and database before an upgrade.
Open source or not, any programmer of any language of any skill level makes typos and syntax errors without realizing it. The difference between a beginner and a someone who has been doing it for years is they can find those mistakes a lot easier ;). I'm fairly new to PHP and Smarty too. But have been programming in another language for about 8 years now.
Posts: 7
Hello again, I have gone and edited the first post and noted that this issue was solved.
In regard to the checkout module, I updated/upgraded to the newer version of cart, but the breadcrumb problem still existed with the other modifications that had been made. I just needed to add an additional argument for the return value.
I have copied all modified files to a local file. I simply listed the files in that manner above so anyone else reading through would know what actual files I was editing/modifying and their exact location. When I first started modifying this gallery, I did not copy these files over. I wound up with a whole list of errors and had to reinstall gallery. A hard way to learn a lesson, but a lesson well learned, LOL.
As far as the gallery being beta, and using it for production, I guess it is a chance I will have to take. Our first and foremost form of sales are done the old fashioned way. We are really just wanting to use the gallery as a test run for offering online sales. PPI offered online sales in the past through myphotobuilder.com but it just was not very user friendly and it did not work out for what they needed. Gallery2 so far offers the ease of use and functionality that they would like to offer. My hopes are that by time we really are ready to actively pursue online sales through the gallery, that a stable full release will be available. Until then, I suppose we will just take our chances.
N E ways, thanks for all of the help and input, and most of all thanks for creating and working on such a wonderful script. Your talent and knowledge amazes me and this gallery2 really is an awesome script... many thanks and kudos to you all.