[Systems] Fwd: Activities.sugarlabs.org down

Bernie Innocenti bernie at codewiz.org
Fri Feb 12 21:12:58 EST 2016


Aleksey, YOU ARE TOTALLY AMAZING. Thank you very much for finding this!

On 02/12/2016 05:13 PM, Aleksey Lim wrote:
> On Fri, Feb 12, 2016 at 01:38:43PM -0500, Bernie Innocenti wrote:
>> I spent some time trying to figure out this issue today, but I have to
>> get back to work now.
>>
>> It seems that something in
>> "/srv/www-sugarlabs/activities/site/app/webroot/.htaccess" is not
>> working any more.
>>
>> If you go to a URL like
>> http://activities.sugarlabs.org/en-US/sugar/addon/4085 now you get a 500
>> error.
>>
>> I figured that some of the ASLO logs had wrong permissions and fixed
>> them so apache can write to its error log, but it's still not logging
>> any errors.
>>
>> Aleksey, could you please have a look?
> 
> It was a PHP issue which not triggered in old env,
> 
> diff --git a/site/app/views/addons/display.thtml b/site/app/views/addons/display.thtml
> index 0affbb4..5fc4824 100644
> --- a/site/app/views/addons/display.thtml
> +++ b/site/app/views/addons/display.thtml
> @@ -253,7 +253,7 @@ if (!empty($coll_addon_added)) {
>      <p <?=$addon['Translation']['description']['locale_html']?>>
>        <?=nl2br($addon['Translation']['description']['string'])?>
>      </p>
> -    <? if (count($previews) > 1): // Only show this if there are 2 or more images. ?>
> +    <?php if (count($previews) > 1): // Only show this if there are 2 or more images. ?>
>        <h4><?=___('Image Gallery')?></h4>
>        <?php
>        foreach (array_slice($previews, 1) as $preview):
> @@ -265,8 +265,8 @@ if (!empty($coll_addon_added)) {
>             href="<?=$full?>" title="<?=$caption?>">
>            <img src="<?=$thumb?>" alt="" />
>          </a>
> -      <? endforeach; ?>
> -    <? endif; ?>
> +      <?php endforeach; ?>
> +    <?php endif; ?>
>  
>      <?php
>      $support_email = $addon['Translation']['supportemail']['string'];
> diff --git a/site/app/views/elements/amo2009/reviews.thtml b/site/app/views/elements/amo2009/reviews.thtml
> index 49e5241..3bab17d 100644
> --- a/site/app/views/elements/amo2009/reviews.thtml
> +++ b/site/app/views/elements/amo2009/reviews.thtml
> @@ -47,7 +47,7 @@ $addon_id = $addon['Addon']['id'];
>  ?>
>  
>  <?=$this->renderElement('amo2009/stars',array('rating' => $rating))?>
> -<?
> +<?php
>  $_url = $html->url('/addon/'.$addon_id);
>  if (!empty($collection_uuid))
>      $_url = $html->appendParametersToUrl($_url, array('collection_id' => $collection_uuid));
> diff --git a/site/app/views/elements/app_compatibility.thtml b/site/app/views/elements/app_compatibility.thtml
> index 2756956..bbb06fe 100644
> --- a/site/app/views/elements/app_compatibility.thtml
> +++ b/site/app/views/elements/app_compatibility.thtml
> @@ -49,6 +49,6 @@
>      <ul>
>          <?php foreach($compatible_apps as $app): ?>
>              <li><?=$this->renderElement('app_versions', array('app' => $app))?></li>
> -        <? endforeach; ?>
> +        <?php endforeach; ?>
>      </ul>
>  </div>
> diff --git a/site/app/views/reviews/display.thtml b/site/app/views/reviews/display.thtml
> index 0639c38..3308486 100644
> --- a/site/app/views/reviews/display.thtml
> +++ b/site/app/views/reviews/display.thtml
> @@ -220,7 +220,7 @@ foreach ($reviews as $review):
>          <?=nl2br($reply['Translation']['body']['string'])?>
>          </div>
>      <? endif; ?>
> -<? endforeach; ?>
> +<php? endforeach; ?>
>  
>  <?php if (!$bare): ?>
>  <? if (!empty($reviews)) echo $this->renderElement('amo2009/pagination');?>
> 


-- 
 _ // Bernie Innocenti
 \X/  http://codewiz.org


More information about the Systems mailing list