Some templates stopped working after update to 4.2.1
  • I have a simple PHP script that is included in the front page template. It fetches the first two headers from a remote RSS file and caches it hourly. It was working in Newscoop 4.2, but in Newscoop 4.2.1 the page doesn't load past the image at the top of this template. It looks like this: 

    <div id="cwi-feed">
    <img src="{{ url static_file='_img/cwi-logga.png' }}" />
    {{ php }}

    function getFeed($feed_url) {
          $cachefile = "cache/cwi.html";


          $cachetime = 60 * 60; // 60 minutes


          // Serve from the cache if it is younger than $cachetime

          if (file_exists($cachefile) && (time() - $cachetime < filemtime($cachefile))) 
          {
             include($cachefile);
             return;
          }
          ob_start(); // start the output buffer
      
      $content = file_get_contents($feed_url);
      $x = new SimpleXmlElement($content);
      
      echo "<ul>";
      
      $i = 0;
      foreach($x->channel->item as $entry) {
        if ($i == 2) { echo "</ul>"; break; }
        echo "<li><a href='$entry->link' title='$entry->title'>" . $entry->title . "</a></li>";
        $i++;
      }
           // open the cache file for writing
           $fp = fopen($cachefile, 'w'); 


           // save the contents of output buffer to the file
          fwrite($fp, ob_get_contents());

        // close the file

            fclose($fp); 

        // Send the output to the browser
            ob_end_flush(); 
    }

    {{ /php }}
    </div>
    Post edited by Sebastian Olsson (2) at 2014-01-24 05:52:37
  • 6 Comments sorted by
  • This is the error-log: 

    [17-Jan-2014 12:18:05 Etc/GMT-1] PHP Fatal error:  Allowed memory size of 100663296 bytes exhausted (tried to allocate 105 bytes) in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php on line 735
    [17-Jan-2014 12:27:54 Etc/GMT-1] PHP Fatal error:  Call to undefined function camp_load_translation_strings() in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/modules/admin/Bootstrap.php on line 63
    [17-Jan-2014 12:33:31 Europe/Stockholm] PHP Fatal error:  Class 'Symfony\Component\HttpKernel\Kernel' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/AppKernel.php on line 13
    [17-Jan-2014 12:34:26 Etc/GMT-1] PHP Parse error:  syntax error, unexpected end of file, expecting ']' in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/classes/Article.php on line 3001
    [17-Jan-2014 12:34:36 Etc/GMT-1] PHP Parse error:  syntax error, unexpected end of file, expecting variable (T_VARIABLE) in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/classes/Image.php on line 361
    [17-Jan-2014 12:35:01 Europe/Stockholm] PHP Notice:  Use of undefined constant CS_PATH_CONFIG - assumed 'CS_PATH_CONFIG' in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/modules/admin/Bootstrap.php on line 28
    [17-Jan-2014 12:35:01 Europe/Stockholm] PHP Notice:  Use of undefined constant DIR_SEP - assumed 'DIR_SEP' in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/modules/admin/Bootstrap.php on line 28
    [17-Jan-2014 12:35:01 Europe/Stockholm] PHP Warning:  require_once(CS_PATH_CONFIGDIR_SEPinstall_conf.php): failed to open stream: No such file or directory in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/modules/admin/Bootstrap.php on line 28
    [17-Jan-2014 12:35:01 Europe/Stockholm] PHP Fatal error:  require_once(): Failed opening required 'CS_PATH_CONFIGDIR_SEPinstall_conf.php' (include_path='/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/../library:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/include:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/../dependencies/include:/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/bombayworks/zendframework1/library:.:/usr/local/share/pear') in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/modules/admin/Bootstrap.php on line 28
    [17-Jan-2014 12:35:03 Europe/Stockholm] PHP Parse error:  syntax error, unexpected end of file in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/include/PEAR.php on line 497
    [17-Jan-2014 12:51:02 Etc/GMT-1] Newscoop error: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error:  in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:250
    [17-Jan-2014 12:51:02 Etc/GMT-1] Newscoop error: imagecreatefromjpeg(): 'http://www.socialisterna.org/bilder/20090110_0048.jpg' is not a valid JPEG file in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:250
    [17-Jan-2014 12:51:02 Etc/GMT-1] Newscoop error: imagesx() expects parameter 1 to be resource, boolean given in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:449
    [17-Jan-2014 12:54:16 Europe/Stockholm] PHP Fatal error:  Class 'Newscoop\Gimme\PaginatorService' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/cache/prod/applicationProdProjectContainer.php on line 812
    [17-Jan-2014 12:56:46 Europe/Stockholm] PHP Fatal error:  Class 'CampSystem' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampSite.php on line 20
    [17-Jan-2014 12:56:47 Europe/Stockholm] PHP Fatal error:  Class 'CampVersion' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/conf/install_conf.php on line 82
    [17-Jan-2014 13:03:27 Europe/Stockholm] PHP Fatal error:  Class 'Doctrine\DBAL\Configuration' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php on line 41
    [17-Jan-2014 13:03:30 Europe/Stockholm] PHP Fatal error:  Class 'Doctrine\DBAL\DriverManager' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle/ConnectionFactory.php on line 58
    [17-Jan-2014 13:03:42 Europe/Stockholm] PHP Fatal error:  Class 'Doctrine\Bundle\DoctrineBundle\DoctrineBundle' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/AppKernel.php on line 20
    [17-Jan-2014 13:06:18 Europe/Stockholm] PHP Fatal error:  Class 'Doctrine\ORM\Configuration' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/cache/prod/applicationProdProjectContainer.php on line 135
    [17-Jan-2014 13:06:18 Europe/Stockholm] PHP Fatal error:  Class 'Doctrine\ORM\Configuration' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/cache/prod/applicationProdProjectContainer.php on line 135
    [17-Jan-2014 13:06:19 Europe/Stockholm] PHP Fatal error:  Class 'Doctrine\ORM\Configuration' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/cache/prod/applicationProdProjectContainer.php on line 135
    [17-Jan-2014 13:06:19 Europe/Stockholm] PHP Fatal error:  Class 'Doctrine\ORM\Configuration' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/cache/prod/applicationProdProjectContainer.php on line 135
    [17-Jan-2014 13:06:19 Europe/Stockholm] PHP Parse error:  syntax error, unexpected ''' (T_ENCAPSED_AND_WHITESPACE), expecting ']' in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php on line 252
    [17-Jan-2014 13:06:20 Europe/Stockholm] PHP Parse error:  syntax error, unexpected ''' (T_ENCAPSED_AND_WHITESPACE), expecting ']' in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php on line 252
    [17-Jan-2014 13:06:20 Europe/Stockholm] PHP Warning:  call_user_func() expects parameter 1 to be a valid callback, class 'Doctrine\ORM\EntityManager' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/cache/prod/applicationProdProjectContainer.php on line 151
    [17-Jan-2014 13:06:20 Europe/Stockholm] PHP Warning:  call_user_func() expects parameter 1 to be a valid callback, class 'Doctrine\ORM\EntityManager' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/cache/prod/applicationProdProjectContainer.php on line 151
    [17-Jan-2014 13:06:21 Europe/Stockholm] PHP Warning:  Unterminated comment starting line 553 in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php on line 553
    [17-Jan-2014 13:06:21 Europe/Stockholm] PHP Parse error:  syntax error, unexpected end of file, expecting function (T_FUNCTION) in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php on line 554
    [17-Jan-2014 13:06:23 Europe/Stockholm] PHP Fatal error:  Class 'Doctrine\ORM\Events' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/library/Newscoop/Doctrine/EventDispatcherProxy.php on line 44
    [17-Jan-2014 13:06:30 Europe/Stockholm] PHP Fatal error:  Class 'Doctrine\ORM\UnitOfWork' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php on line 140
    [17-Jan-2014 13:06:31 Europe/Stockholm] PHP Fatal error:  Class 'Doctrine\ORM\UnitOfWork' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php on line 140
    [17-Jan-2014 13:06:32 Europe/Stockholm] PHP Parse error:  syntax error, unexpected end of file in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2351
    [17-Jan-2014 13:06:32 Europe/Stockholm] PHP Warning:  Unterminated comment starting line 2747 in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2747
    [17-Jan-2014 13:06:32 Europe/Stockholm] PHP Parse error:  syntax error, unexpected end of file, expecting function (T_FUNCTION) in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2748
    [17-Jan-2014 13:19:15 Europe/Stockholm] PHP Fatal error:  Interface 'Symfony\Bridge\Doctrine\RegistryInterface' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle/Registry.php on line 29
    [17-Jan-2014 13:19:15 Europe/Stockholm] PHP Fatal error:  Interface 'Symfony\Bridge\Doctrine\RegistryInterface' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle/Registry.php on line 29
    [17-Jan-2014 13:19:20 Europe/Stockholm] PHP Fatal error:  Class 'Symfony\Bundle\FrameworkBundle\FrameworkBundle' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/AppKernel.php on line 17
    [17-Jan-2014 13:19:57 Europe/Stockholm] PHP Fatal error:  Class 'Symfony\Component\HttpKernel\UriSigner' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/cache/prod/applicationProdProjectContainer.php on line 1278
    [17-Jan-2014 13:26:47 Europe/Stockholm] PHP Fatal error:  Class 'Symfony\Component\HttpKernel\DataCollector\TimeDataCollector' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/cache/prod/applicationProdProjectContainer.php on line 867
    [17-Jan-2014 13:26:55 Europe/Stockholm] PHP Fatal error:  Class 'Symfony\Component\HttpKernel\Fragment\InlineFragmentRenderer' not found in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/cache/prod/applicationProdProjectContainer.php on line 553
    [17-Jan-2014 13:39:58 Etc/GMT-1] Newscoop error: rmdir(/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/install/classes/../../cache/prod/annotations): Directory not empty in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_utility.php:202
    [17-Jan-2014 13:40:00 Europe/Stockholm] PHP Fatal error:  Uncaught exception 'JMS\Serializer\Exception\RuntimeException' with message 'Could not create cache directory "/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/cache/prod/jms_serializer".' in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/jms/serializer-bundle/JMS/SerializerBundle/DependencyInjection/JMSSerializerExtension.php:70
    Stack trace:
    #0 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php(35): JMS\SerializerBundle\DependencyInjection\JMSSerializerExtension->loadInternal(Array, Object(Symfony\Component\DependencyInjection\ContainerBuilder))
    #1 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php(50): Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension->load(Array, Object(Symfony\Component\DependencyInjection\ContainerBuilder))
    #2 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php(39): Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass->process(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
    #3 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php(119): Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass->process(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
    #4 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php(559): Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
    #5 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/bootstrap.php.cache(659): Symfony\Component\DependencyInjection\ContainerBuilder->compile()
    #6 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/bootstrap.php.cache(595): Symfony\Component\HttpKernel\Kernel->buildContainer()
    #7 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/bootstrap.php.cache(380): Symfony\Component\HttpKernel\Kernel->initializeContainer()
    #8 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/application/bootstrap.php.cache(411): Symfony\Component\HttpKernel\Kernel->boot()
    #9 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/public/index.php(68): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, false)
    #10 /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/index.php(17): require_once('/www/webvol20/l...')
    #11 {main}
      thrown in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/jms/serializer-bundle/JMS/SerializerBundle/DependencyInjection/JMSSerializerExtension.php on line 70
    [17-Jan-2014 13:40:02 Etc/GMT-1] Newscoop error: rmdir(/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/install/classes/../../cache/prod/sessions): Directory not empty in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_utility.php:202
    [17-Jan-2014 13:40:02 Etc/GMT-1] Newscoop error: rmdir(/www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/install/classes/../../cache/prod): Directory not empty in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_utility.php:202

  • Also, when I click on an article, there is only a blank page. No errors are added to the log file. 
  • Here are some more, possibly unrelated, errors: 

    [17-Jan-2014 15:31:41 Etc/GMT-1] Newscoop error: Undefined variable: w_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:31:41 Etc/GMT-1] Newscoop error: Undefined variable: h_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:31:41 Etc/GMT-1] Newscoop error: imagecreatetruecolor(): Invalid image dimensions in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:31:41 Etc/GMT-1] Newscoop error: Undefined variable: w_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:31:42 Etc/GMT-1] Newscoop error: Undefined variable: h_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:31:42 Etc/GMT-1] Newscoop error: imagecopyresampled() expects parameter 1 to be resource, boolean given in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:31:42 Etc/GMT-1] Newscoop error: imagejpeg() expects parameter 1 to be resource, boolean given in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:637
    [17-Jan-2014 15:31:42 Etc/GMT-1] Newscoop error: Undefined variable: w_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:31:42 Etc/GMT-1] Newscoop error: Undefined variable: h_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:31:42 Etc/GMT-1] Newscoop error: imagecreatetruecolor(): Invalid image dimensions in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:31:42 Etc/GMT-1] Newscoop error: Undefined variable: w_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:31:42 Etc/GMT-1] Newscoop error: Undefined variable: h_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:31:42 Etc/GMT-1] Newscoop error: imagecopyresampled() expects parameter 1 to be resource, boolean given in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:31:42 Etc/GMT-1] Newscoop error: imagejpeg() expects parameter 1 to be resource, boolean given in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:637
    [17-Jan-2014 15:31:43 Etc/GMT-1] Newscoop error: Undefined variable: w_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:31:43 Etc/GMT-1] Newscoop error: Undefined variable: h_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:31:43 Etc/GMT-1] Newscoop error: imagecreatetruecolor(): Invalid image dimensions in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:31:43 Etc/GMT-1] Newscoop error: Undefined variable: w_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:31:43 Etc/GMT-1] Newscoop error: Undefined variable: h_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:31:43 Etc/GMT-1] Newscoop error: imagecopyresampled() expects parameter 1 to be resource, boolean given in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:31:43 Etc/GMT-1] Newscoop error: imagejpeg() expects parameter 1 to be resource, boolean given in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:637
    [17-Jan-2014 15:31:43 Etc/GMT-1] Newscoop error: Undefined variable: w_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:31:43 Etc/GMT-1] Newscoop error: Undefined variable: h_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:31:43 Etc/GMT-1] Newscoop error: imagecreatetruecolor(): Invalid image dimensions in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:31:43 Etc/GMT-1] Newscoop error: Undefined variable: w_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:31:43 Etc/GMT-1] Newscoop error: Undefined variable: h_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:31:43 Etc/GMT-1] Newscoop error: imagecopyresampled() expects parameter 1 to be resource, boolean given in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:31:43 Etc/GMT-1] Newscoop error: imagejpeg() expects parameter 1 to be resource, boolean given in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:637
    [17-Jan-2014 15:57:58 Etc/GMT-1] Newscoop error: Undefined variable: w_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:57:58 Etc/GMT-1] Newscoop error: Undefined variable: h_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:57:58 Etc/GMT-1] Newscoop error: imagecreatetruecolor(): Invalid image dimensions in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:494
    [17-Jan-2014 15:57:58 Etc/GMT-1] Newscoop error: Undefined variable: w_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:57:58 Etc/GMT-1] Newscoop error: Undefined variable: h_dest in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:57:58 Etc/GMT-1] Newscoop error: imagecopyresampled() expects parameter 1 to be resource, boolean given in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:508
    [17-Jan-2014 15:57:58 Etc/GMT-1] Newscoop error: imagejpeg() expects parameter 1 to be resource, boolean given in /www/webvol20/lx/qocik3a4fn8yqn5/socialisterna.org/public_html/template_engine/classes/CampGetImage.php:637

  • I deleted everything and installed it from scratch and now I can get all the articles, but it will not run the PHP code. I commented out that part of the template and the rest of the page shows up, until the next bit of code, which is in multimedia.tpl. Assigning a few variables is enough to throw it off.

    EDIT: It turns out the problem with the articles was only when they had a video attachment, so there is no difference in the installation. It is this version of Newscoop that has broken some of the templates.
    Post edited by Sebastian Olsson (2) at 2014-01-24 05:57:38
  • I tested different parts of the template and this part breaks the template:

                {{ if !in_array($gimme->attachment->file_name|truncate:{{ $gimme->attachment->file_name|count_characters:true - $gimme->attachment->extension|count_characters:true }}:'':true, $videos) }}{{ $videos[] = $gimme->attachment->file_name|truncate:{{ $gimme->attachment->file_name|count_characters:true - $gimme->attachment->extension|count_characters:true }}:'':true }}
                {{ /if }}

    I use it with a foreach to make videos with the same filename show up as sources in different formats for the same video. Why did this stop working in Newscoop 4.2.1?
  • I changed a file to add permission for the {{php}} tag, so the first one works now. But this did not solve the other problem.