failed to open stream: No such file or directory

Permalink 1 user found helpful
I'm getting this error or similar when I try to use various blocks since I updated to the latest version of C5.
Does anyone know how I can fix this. It's driving me nuts :-(

Warning: include(/Users/Rosie/Sites/PP_WP_0419/iae.uk.com/blocks/ryan_page_value/templates//view.php) [function.include]: failed to open stream: No such file or directory in /Users/Rosie/Sites/PP_WP_0419/iae.uk.com/concrete/core/libraries/block_view.php on line 311

Warning: include() [function.include]: Failed opening '/Users/Rosie/Sites/PP_WP_0419/iae.uk.com/blocks/ryan_page_value/templates//view.php' for inclusion (include_path='/Users/Rosie/Sites/PP_WP_0419/iae.uk.com/libraries/3rdparty:/Users/Rosie/Sites/PP_WP_0419/iae.uk.com/concrete/libraries/3rdparty:.:') in /Users/Rosie/Sites/PP_WP_0419/iae.uk.com/concrete/core/libraries/block_view.php on line 311

rosie607
View Replies:
rosie607 replied on at Permalink Reply
rosie607
ps. I have tried the JSON fix but to no avail ;-(
DAkers replied on at Permalink Reply
Hi Rosie,

I see in that error that this filepath "/Users/Rosie/Sites/PP_WP_0419/iae.uk.com/blocks/ryan_page_value/templates//view.php" there is a blank between the 2 backslashes before view.php. That is where the name of the custom template should be. Each template has their own folder. I'm not sure why it is trying to pull from a blank custom template name folder, but I believe that is where the problem is.
mhawke replied on at Permalink Reply
mhawke
Good catch DAkers!

Try un-installing the 'Ryan Page Value' block (Dashboard->Block Types->Ryan Page Value->Remove) and re-install it if you still need it.
onemhz replied on at Permalink Reply 1 Attachment
onemhz
Simple fix for this goes to "blocks\ryan_page_value\controller.php":

Function VIEW() generates error when value is empty so add IF, like so:

public function view() {
         $templateHandle = $this->getTemplateHandle();
         if ($templateHandle) {
         $this->render('templates/'.$templateHandle);
         }
      }



and also to get page attributes to work:

public function getAvailableAttributes() {
         $ctype = CollectionType::getByHandle($this->cobj->getCollectionTypeHandle());
         return $this->cobj->getSetCollectionAttributes();
      }


Attachemnt contains full package with those fix, work and tested from 5.6.3