Can't add single pages "Failed to open stream: No such file or directory"

Permalink 1 user found helpful
Hello!

I have added a file in the root/single_pages/ directory and then through the system /dashboard/pages/single/ with the files name. Everything works so far, but when i visit the page it says:

Warning: include(/root/public_html/concrete/single_pages/dashboard/reports/registrations.php): 
failed to open stream: No such file or directory in 
/root/public_html/concrete/core/libraries/view.php on line 905 
Warning: include(): Failed opening '/root/public_html/concrete/single_pages/dashboard/reports/registrations.php' for inclusion 
(include_path='/root/public_html/libraries/3rdparty:/root/public_html/concrete/libraries/3rdparty:.:/usr/local/lib/php') in 
/root/public_html/concrete/core/libraries/view.php on line 905


I am using 5.6.1.2.

All cache is turned off.

It looks similar to the bug reported here:http://www.concrete5.org/developers/bugs/5.6.0.1/5.6.0-adding-singl... but that should have been taking care of in the following update.

Any help is appreciated!


UPDATE -------------
If I add the file to the corresponding /concrete/ directory, it works fine. So it has to do with how or where it looks for the single pages.


UPDATE 2 -----------
It all works fine when repeating the process on another of my sites running 5.6.1. My current alternatives as I see it is that something is wrong with 1) version 5.6.1.2 or 2) my environment.


This is my environment info:

# concrete5 Version
5.6.1.2
# concrete5 Packages
None
# concrete5 Overrides
blocks/registration, blocks/page_list, blocks/single_file, blocks/autonav, blocks/simple_image, blocks/blurb, controllers/blocks, single_pages/test.php, single_pages/dashboard, themes/weldonsweden
# Server Software
Apache/2
# Server API
apache2handler
# PHP Version
5.3.21
# PHP Extensions
apache2handler, bcmath, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, session, SimpleXML, soap, sockets, SPL, SQLite, sqlite3, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, zlib.
# PHP Settings


UPDATE 3 ----------
It works as expected in earlier version (5.6.1)! I installed it in a subdirectory as a test and the single pages is added. Can we with this confirm that it is a bug in the 6.5.1.2?

View Replies:
naumeK replied on at Permalink Reply
naumeK
Hi
How is your file named?Is it on the right place? Root/single_pages/dashboard/your_page_name/view.php or Root/single_pages/dashboard/your_page_name.php. If this doesn`t work you need a controller for this page. Root/controllers/dashboard/your_page_name.php with the corect class..
Hope this helps.
jensborje replied on at Permalink Reply
Hi,
The file is named registrations.php and is placed in root/single_pages/dashboard/reports/registrations.php in the system when adding the page, I typed /dashboard/reports/registrations.

In the error message, it looks in the /concrete/single_pages/ directory, not the root. Can this have something to do with it?
naumeK replied on at Permalink Reply
naumeK
This should work you didn't any mistaks. Have you swiched the fullpage cache off?
Can you sea the registrasions page in fullsitemap?
go to fullsitemap activate system pages and go to dashboard->reports->registrations click on it and choose visit.

Try to refresh the site. go to /dashboard/pages/single/
and find the registrations page and click refresh.
jensborje replied on at Permalink Reply
Yes i have done all the things you have mentioned.
Pulling my hair over this...
jvansanten replied on at Permalink Reply
When you get the error message, how are you calling the page? Is it being called in a menu that is capturing the single page, or are you hardcoding the path?
jensborje replied on at Permalink Reply
I can reach it from the dashboard as a link under the Reports section.
Instead of showing the page, I get this message as a text string. I have the top menu and the dashboard background image etc.
naumeK replied on at Permalink Reply
naumeK
try to add a folder -> single_pages/dashboard/reports/registrations/view.php
add your registrations.php code in view.php and delete the registrations.php then go to /index.php/dashboard/pages/single/ find your registrations page and click on refresh..
maybe this works.
jensborje replied on at Permalink Reply
Thanks for the idea, unfortunately it did not solved the problem.
jensborje replied on at Permalink Reply
Original post updated.
If I add the file to the corresponding /concrete/ directory, it works fine. So it has to do with how or where it looks for the single pages.
naumeK replied on at Permalink Reply
naumeK
Hi
I think I found your problem. login to your file directory in example using filezila and go to your created registrasions.php file set the permissions of this file to 755.
Then concrete5 can handle with this file.

Don't forget to delete the registrations file from the concrete/singlepages directory again.
jensborje replied on at Permalink Reply
Yes, I have thought about that as well and the file permissions is already set to 755. Does not solve my problem though.. But thank you for the help! Anything is appreciated!
jensborje replied on at Permalink Reply
I downloaded the 5.6.1 version and installed it in a subdirectory as a test. Here I can add single pages as expected! Can we with this confirm that it is a bug in the 6.5.1.2?
mediasplash replied on at Permalink Reply
Hiya,
I know that this post is quite old now but you were getting almost exactly the same issue that i'm having now with 5.7.4.1 and I'm searching for a solution. Did you ever manage to work this out at all?
webroot replied on at Permalink Reply
I took am seeing the same.
include(C:\repos\CMS2015\src\concrete/themes/<redacted>/elements/sitemap.php): failed to open stream: No such file or directory


Interestingly enough, this file is actually located in the application/themes directory, not the concrete/themes directory. Existing elements like header.php are perfectly capable of being pulled in, but any new files I create such as this one fail to include properly and I get this message.

Any input would be great!
webroot replied on at Permalink Reply
I took am seeing the same.
include(C:\repos\CMS2015\src\concrete/themes/<redacted>/elements/sitemap.php): failed to open stream: No such file or directory


Interestingly enough, this file is actually located in the application/themes directory, not the concrete/themes directory. Existing elements like header.php are perfectly capable of being pulled in, but any new files I create such as this one fail to include properly and I get this message.

Any input would be great!
decibeldesign replied on at Permalink Reply
decibeldesign
I'm experiencing this issue with 5.7.5.6. I have other static pages that are working just fine. Now, I can't seem to add any. What worked for you all?

Edit: I had to clear my cache and then I was able to successfully added my static page.