jReviews Support Forum

jReviews 1.x => jReviews 1.2.09 => Topic started by: terrybritton on February 21, 2008, 04:19:52 PM



Title: errors on edit when images in article
Post by: terrybritton on February 21, 2008, 04:19:52 PM
I can add and edit an entry and everything works fine as long as there are no images attached to the listing. If the listing has an image when it adds ok, but when I try to edit it I get a blank page and this error is written to my log file:

PHP Parse error:  syntax error, unexpected T_ENDIF in /htdocs/test/components/com_jreviews/tmpl/default/image_manager.ctp on line 30, referer: http://test.castawaysclub.com/content/view/77/


Title: Re: errors on edit when images in article
Post by: Alejandro on February 21, 2008, 05:13:11 PM
Oops. Open that file and find:

<?php endif ?>

change to:

<?php endif; ?>


Title: Re: errors on edit when images in article
Post by: terrybritton on February 21, 2008, 05:29:45 PM
Already did that. Just thought I'd let you know about the error.


Title: Re: errors on edit when images in article
Post by: terrybritton on February 21, 2008, 05:55:52 PM
I spoke too soon. I had changed the line, but never tested it. Even with that change the problem still exists.


Title: Re: errors on edit when images in article
Post by: Alejandro on February 21, 2008, 06:24:41 PM
Are you sure you are editing the correct theme template. I mean default vs. store?

Even with this missing semicolon, I can edit images on my dev site. Please submit a ticket with access to see the problem and ftp to troubleshoot it.


Title: Re: errors on edit when images in article
Post by: terrybritton on February 21, 2008, 07:04:09 PM
I'll submit a ticket. I'm editing the file that the error message is pointing at. Also, just so you now I uninstalled sh404sef and still had this problem.


Title: Re: errors on edit when images in article
Post by: BigDutch on April 07, 2008, 01:26:24 AM
Im running an offline "test" version of my joomla site on my LAN.  I upgraded the offline to jReviews 1.2.10 over the weekend and am testing it.

I have the same problem with this T_ENDIF line30.

Is there a fix ?


Title: Re: errors on edit when images in article
Post by: Alejandro on April 07, 2008, 08:02:55 AM
The fix is the one I posted above, the user didn't really update the file. Attached the file you need to replace in your template folder after you unzip it:



Title: Re: errors on edit when images in article solved
Post by: harrisw on June 06, 2008, 10:50:54 AM
We had a problem with the images on the my listings or edit my listings page. When they were displayed they broke the css so menus appeared off the page.

The url of the edit my listings page by the way is (where yourdomain.com is the name of your site):
http://www.yourdomain.com/index.php?option=com_jreviews&task=edititem&id=319

Here is how to fix it.

Using ftp open image_manager.ctp in a text editor.
The path to this file should be something like:
/components/com_jreviews/tmpl/store/image_manager.ctp

If you are using the default instead of store it will be:
/components/com_jreviews/tmpl/default/image_manager.ctp


The file will look like this:
<?php
/**
 * jReviews - Reviews Extension
 * Copyright (C) 2006 Alejandro Schmeichler
 * This is not free software, do not distribute it.
 * For licencing information visit http://www.reviewsforjoomla.com
 * or contact sales@reviewsforjoomla.com
 *
 * Template used inside the content editing form to allow setting intro image and deletion of images
 **/

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );

?>
<div id="content_images" style="margin-top:5px; margin-bottom:5px;">   
<span class="label"><?php echo _JR_IMAGE_MANAGER_LABEL?></span>
<br />

<?php $i = 0; foreach($thumbs->thumbs AS $tn):?>

   <div id="image<?php echo $i?>" style="margin:1px;padding-left:3px;padding-top:2px;border:1px solid #000;float:left;">
   
      <img style="border:1px solid #BFBFBF; width:60px;height:60px;" src="<?php echo $thumbs->site_tn.$tn['image_thumb']?>"  />
      <br />
      
      <? if(count($thumbs->thumbs)>1):?>
      <input style="cursor: pointer;" id="intro<?php echo $i?>" name="intro[]" type="radio" value="<?php echo $i?>" <?php echo $i == 0 ? 'checked="checked"' : ''?> onclick="xajax.$('image_edit').style.display = '';xajax_xajaxDispatch('listings','imageSetMain',<?php echo $content_id?>,'<?php echo $tn['image_target']?>');" />
      &nbsp;&nbsp;
      <?php endif; ?>
      
      <img style="cursor: pointer;" src="<?php echo _TMPL_SITE_JREVIEWS?>/images/trash.png"
         onclick="if(confirm('<?php echo _JR_IMAGE_CONFIRM_DELETE?>')) {xajax.$('image_edit').style.display = '';xajax_xajaxDispatch('listings','imageDelete',<?echo $content_id?>,<?php echo $i?>,'<?php echo $tn['image_target']?>');};" />
   
   </div>
<?php $i++; endforeach;?>

<div style="clear:both;"></div>
<img id="image_edit" style="display: none;" src="<?php echo _TMPL_SITE_JREVIEWS?>/images/loading.gif" />



Now change the file and include an additional </div> after the line:
<?php $i++; endforeach;?>


So it reads:
<?php $i++; endforeach;?>
</div>

<div style="clear:both;"></div>
<img id="image_edit" style="display: none;" src="<?php echo _TMPL_SITE_JREVIEWS?>/images/loading.gif" />



That should sort things out.

i hope this helps and was clear enough for people to understand.

HarrisW