Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

The case of the extraneous “}”
 
kathys
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2008-04-01
 

First of all, can ANYONE running 1.1.1 correctly display images in the frontend or the backend? I’m not sure how it is possible from what I just found.

I have successfully uploaded image placeholders - they are on the server - but the frontend and the backend cannot find them. The reason the images cannot be found is because the helper function to generate the image string puts an extraneous “}” on the address!!!

here is the path to my placeholder image (from the generated source) :

mystore.com/magento/}media/catalog/product/placeholder/default/placeholder_image.jpg

Please note the “}” after “magento/” . If I remove the “}” and put the resulting address in my browser address bar, my image displays. But with it in the string I get page not found.

I have looked in magento/app/code/core/mage/catelog/Helper/Image.php but really don’t know if this is the correct file or what I am looking for exactly.

Are there any php developers willing to PLEASE take a look to see where the “}” is coming from?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
ramedia
Member
 
Total Posts:  70
Joined:  2008-05-17
 

Check your .htaccess file for RewriteBase .  It should read “RewriteBase /” if magento is installed in your web root.  If magento is in a folder in web root called “magento” then your rewrite base should be:  RewriteBase /magento/

This may or may not be where the “}” is coming from.  Check to see if it shows up in your links as well.  If it shows up in all urls, magento or not, then it is definately with apache.  If it is apache, start with mod rewrite, if not there, then try the apache config file (you’ll need root access, which you will only have if your are not on a shared server.)

 
Magento Community Magento Community
Magento Community
Magento Community
 
ramedia
Member
 
Total Posts:  70
Joined:  2008-05-17
 

Also, you can set the base when you install the site.  You may have inadvertantly set that wrong on install.  You’ll have to open the database and change that manually.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kathys
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2008-04-01
 

Thank you ramedia.

My web host installed the upgrade for me. I will check with them about this issue. Magento is actually installed in a folder and not in the root of the directory.

I checked my .htaccess file and it is empty. Should that be the case?

So are you saying another possibility is there might be a typo in the database that is causing this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ramedia
Member
 
Total Posts:  70
Joined:  2008-05-17
 

First let’s find out if that “}” is appended to everything.  Do you have a link to your store?  Are you using the default theme?

 
Magento Community Magento Community
Magento Community
Magento Community
 
kathys
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2008-04-01
 

PS to ramedia -

I checked all of my urls and none of them have the extra “}”. All of the page links work fine. It’s just the images that have a problem.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
kathys
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2008-04-01
 

Thank you

My store (unfinished!) is actually at decaturespresso.com/shop/

When you go to one of the product pages you will see a grid with products and no images. Please excuse the still VERY messy design!

 
Magento Community Magento Community
Magento Community
Magento Community
 
ramedia
Member
 
Total Posts:  70
Joined:  2008-05-17
 

That looks like a typo either in the template, or in the database.  I would look in admin> system> web (side tab)>Unsecure (also correct secure if you are doing ssl)> Base Media URL.  It should read:  {{unsecure_base_url}}media/ take out any extra “}”

It is not a problem with apache mod rewrite or your htaccess file.  The culprit is afoot!  Make haste Watson!

 
Magento Community Magento Community
Magento Community
Magento Community
 
kathys
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2008-04-01
 

Thank you for your help, ramedia.

There were no extraneous “}” in the admin panel base urls, but I contacted my web host who did the installation and they did indeed find an extraneous “}” in the base_media_url on the install! They removed it and now my placeholder images are all showing up as they should.

Thanks so much for pointing me in the right direction on this issue. I had already expended a massive amount of un-billable time completely redoing my custom theme to work correctly in 1.1.1.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ramedia
Member
 
Total Posts:  70
Joined:  2008-05-17
 

Also check that if you go over to secure server, that the correction is there as well.  There are two instances of base_media_url, one for unsecure site, and one for secure.  You did a good job on the site and the template.  Looks great.  You shouldn’t have to change hardly anything in your template to upgrade to a new core.  I’m wondering if you are altering the correct files.  Stay away from the core.  If you need to change text use inline editing.  Make a duplicate of the default template.  Upload that to the same dir as the default.  Alter the files of the default and assign those altered pages as needed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kathys
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2008-04-01
 

Thanks. I will make certain to get my host to check the reference when we go over to secure! This is not the first time I have been burned by a typo that the host has made. Once was in the name servers for another site! It was crazy. Someone is typing too fast!

Yes, I am staying away from the core in my customizations, that is why I was surprised when my custom design had a meltdown after upgrading to 1.1.1. But they changed a lot of the helper function calls so things that were being referenced (in the original default templates that I had made minimal changes to) were no longer there. I just wish that some sort of heads up about these template file changes had been given SOMEWHERE by the magento team in addition to the sunny “Magento 1.1 is here!” I have already used winmerge to identify the changes to css and templates (none) in 1.1.2, but am still gun shy about upgrading based on some of the grief expressed in the forums. I also have another store I am developing at annebishtonstencils.com/magento/. I had to completely redo that custom design as well. Still have a few tweaks to work out there. The famous magento “back to school” call out is appearing again in my sidebar! Thankfully neither is live yet!

I appreciate all of your help on this. It has allowed me to move forward again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ramedia
Member
 
Total Posts:  70
Joined:  2008-05-17
 

I looked that up after you mentioned your issues.  http://www.magentocommerce.com/wiki/upgrading_magento_themes_for_the_latest_releases.  What a bunch of crap.  The whole point of separating all these elements (and this is the most separated software I have ever seen) is so you can update the core without screwing up people’s templates. 

If there is stuff I don’t know where it is coming from, I do a site wide search in the code for the item’s css class, and or the image name. 

The left call out, is in the xml file:  app>design>frontend>default>your template>layout> catalog.xml

It will look like this:
<block type="core/template" name="left.permanent.callout" after="-" template="callouts/left_col.phtml">
<action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
<action method="setImgAlt" translate="alt" module="catalog"><alt>Did you know? Our customer service is available 24/7</alt></action>
</block>

Comment out that code and you’ll never see that stupid ad again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kathys
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2008-04-01
 

I saw that wiki posting too, but I opted for reimplementing my theme on the defaut theme’s css, template and layout files all over AGAIN rather than trying to find all occurrences of things that have changed. I don’t want to get slammed by something I missed once the store is live. And yes, the back-to-school callout has been commented into oblivion… cheese

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top