Page Not Found No page could be found at this address. Back to Home.

Permalink
Hello all,

I hope someone can provide some assistance. I have a site running on 5.6.2.1 that has been problem free for several months now. This week I am trying to update some content I am getting the error message "Page Not Found No page could be found at this address. Back to Home." This happens when I try to save content in a block. Has anyone run into this problem before? Any ideas on how to troubleshoot it?

The site is hosted by Pacifichost and I have included the environment information below.

Thanks,

Mark




# concrete5 Version
5.6.2.1

# concrete5 Packages
Automatic Email Obfuscator (1.2.3), Bootstrap Carousel (2.1.1.1), Restore Automated Jobs (1.3), Skyline (0.9.6), Social Icons (1.2), Testimonials (1.5), Touch Gallery (1.4.3), Tweetcrete (1.6.8).

# concrete5 Overrides
blocks/defunct_social_icons, blocks/jereme_tweetcrete, blocks/defunct_testimonials, themes/ccb_theme, themes/custom_skyline

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
5.3.26

# PHP Extensions
bcmath, bcompiler, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, enchant, ereg, exif, filter, ftp, gd, gettext, hash, iconv, imagick, imap, intl, ionCube Loader, json, libxml, mbstring, mcrypt, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, Reflection, session, SimpleXML, soap, sockets, SourceGuardian, SPL, SQLite, sqlite3, standard, suhosin, tidy, timezonedb, tokenizer, uploadprogress, wddx, XCache, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Guard Loader, zip, zlib.

# PHP Settings
max_execution_time - 999
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 999
max_input_vars - 1000
memory_limit - 999M
post_max_size - 999M
safe_mode - Off
safe_mode_exec_dir - /usr/local/php/bin
safe_mode_gid - Off
safe_mode_include_dir - <i>no value</i>
sql.safe_mode - Off
upload_max_filesize - 999M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH
suhosin.cookie.max_array_depth - 100
suhosin.cookie.max_array_index_length - 64
suhosin.cookie.max_name_length - 64
suhosin.cookie.max_totalname_length - 256
suhosin.cookie.max_value_length - 10000
suhosin.cookie.max_vars - 100
suhosin.executor.include.max_traversal - 4
suhosin.executor.max_depth - 0
suhosin.get.max_array_depth - 50
suhosin.get.max_array_index_length - 64
suhosin.get.max_name_length - 64
suhosin.get.max_totalname_length - 256
suhosin.get.max_value_length - 512
suhosin.get.max_vars - 100
suhosin.log.phpscript.is_safe - Off
suhosin.memory_limit - 999M
suhosin.post.max_array_depth - 100
suhosin.post.max_array_index_length - 64
suhosin.post.max_name_length - 64
suhosin.post.max_totalname_length - 256
suhosin.post.max_value_length - 65000
suhosin.post.max_vars - 200
suhosin.request.max_array_depth - 100
suhosin.request.max_array_index_length - 64
suhosin.request.max_totalname_length - 256
suhosin.request.max_value_length - 65000
suhosin.request.max_varname_length - 64
suhosin.request.max_vars - 200
suhosin.session.max_id_length - 128
suhosin.upload.max_uploads - 25
xcache.var_maxttl - 0

 
johnpaulb replied on at Permalink Reply
johnpaulb
Hello mlabombarda,

Setting errors to display on page, may provide a more detailed error:
http://www.webhostinghub.com/support/edu/concrete5/groups-permissio...

Since this occurs when you save, have you checked your file permissions? I recommend setting folders to 755, and files to 644. Your host may have a script or means of automating this check.

Have you tried enabling logging?
http://www.webhostinghub.com/support/edu/concrete5/groups-permissio...

You can then review the logs for more information:
http://www.webhostinghub.com/support/edu/concrete5/groups-permissio...

I hope this helps,
John-Paul
mlabombarda replied on at Permalink Reply
John-Paul,

Thank you, very much, for your response. Unfortunately, logging is not showing any errors related to the Page Not Found message. I have narrowed down the problem a little bit. I am able to edit and save most pages. I am also able to add new pages. What I am not able to do is edit a page or add to a page that contains any code for PayPal buttons. That code is the standard html from Paypal (see below).

<form name="_xclick" action="https://www.paypal.com/us/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="me@mybusiness.com">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Teddy Bear">
<input type="hidden" name="amount" value="12.99">
<input type="image" src="http://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>


What I don't know is why is this not working now? I have a page of PayPal buttons that work, I just can't edit or delete them.

Appreciate any help.

Thanks,

Mark
JohntheFish replied on at Permalink Reply
JohntheFish
I suspect something in the paypal code could be breaking the c5 edit mode code. Maybe a javascript argument.

The usual solution for such is to wrap the arguing code in an is Edit Mode test and output a placeholder when the page is in edit mode.
mlabombarda replied on at Permalink Reply
JohntheFish,

Thanks for your reply. Could you provide more detail on how to do what you are suggesting?


Thanks,

Mark
mlabombarda replied on at Permalink Reply
JohntheFish,

Thanks for your reply. Could you provide more detail on how to do what you are suggesting?


Thanks,

Mark
JohntheFish replied on at Permalink Reply
JohntheFish
Below is the code for the regular view of an html block.
<?php  defined('C5_EXECUTE') or die("Access Denied."); ?>
<div id="HTMLBlock<?php echo intval($bID)?>" class="HTMLBlock">
<?php echo $content; ?>
</div>


You need to copy that to yoursite.com/blocks/html/templates/yourtemplatename.php and then edit the file to:
<?php  defined('C5_EXECUTE') or die("Access Denied."); ?>
<div id="HTMLBlock<?php echo intval($bID)?>" class="HTMLBlock">
<?php 
$c=Page::getCurrentPage();
if ($c->isEditMode()){
  echo "<p>HTML Block Content not shown in edit mode</p>";
} else {
  echo $content; 
}
?>
</div>


You could get fancier with the edit mode message, but the above is pretty much a minimum.

Then turn off all the c5 caches and clear them.

Then you add an html block and just put some test content into it (not your form)like:
<p>Hello</p>


Save the block. Then in Custom Templates select your custom template. Save the page, then go in and out of edit mode a few times to test the above works and shows Hello or the edit mode message.

Once happy with the template and it is thoroughly tested, edit the block and paste in the code for your form (ie. Only paste the form code into a block that already has the edit mode template, or you will get stuck!!!)

If it all goes wrong, you can go to the sitemap via the dashboard and revert the page version.

Test it again and go in and out of edit mode a few times.

Once you are happy, you may re-enable whatever caches you use. But remember to always switch off and clear the caches before you edit that page, or you will end up with the view code showing on the edit mode page and breaking everything!
JohntheFish replied on at Permalink Reply
JohntheFish
JohntheFish replied on at Permalink Reply
JohntheFish
Just submitted the above as a howto.

EDIT - howto now approved at:
http://www.concrete5.org/documentation/how-tos/developers/prevent-a...
mlabombarda replied on at Permalink Reply
John,

Thanks for your time in helping me with this problem. I know very little about PHP but was able to follow your directions and created the template. I created a new page with just an HTML block with <p>Hello</p>. Turned off caching, cleared the cache. When I apply the template I get the following error: Fatal error: Call to a member function isEditMode() on a non-object in /home/mysite/public_html/blocks/html/templates/test_template.php on line 4.

What am I missing?

Thanks,

Mark
JohntheFish replied on at Permalink Reply
JohntheFish
First, check that you have "$c" and not just "c".

$c is supposed to be a global object for a the current page. But there are occasionally situations where it just isn't there.

So if you have checked "$c" and it makes no difference, you can insert the following immediately before the "if"

$c=Page::getCurrentPage();
if( ....... etc
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
I had a few minutes, so have just run this myself and the
$c=Page::getCurrentPage();


Is needed to make this work. I also spotted a typo in my original post, so have corrected it above.
<?php  defined('C5_EXECUTE') or die("Access Denied."); ?>
<div id="HTMLBlock<?php echo intval($bID)?>" class="HTMLBlock">
<?php 
$c=Page::getCurrentPage();
if ($c->isEditMode()){
  echo "<p>HTML Block Content not shown in edit mode</p>";
} else {
  echo $content; 
}
?>
</div>