To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Ticket #469 (closed enhancement: fixed)

Opened 20 months ago

Last modified 13 months ago

error404Success.php -- add an Area and RichText with fixtures

Reported by: johnnybenson Owned by: johnnyoffline
Priority: major Milestone: 1.5
Component: apostrophePlugin Version: trunk
Keywords: error404, 1.5rc2 Cc: rickybanister, jake, johnnyoffline, agilbert, geoffd, dordille
Symfony version: 1.4

Description

When Spike visited, he mentioned a great idea about having a 404 page that uses an Area for editing the message it displays.

I went ahead and tested it in our error404Success.php.

It works great, I just had to add the a helper to the template.

The problem is that the content in there currently has been graciously I18N'd.

I don't want to outright delete it from the error404Success, but I think it should be loaded into a richtext slot as a fixture when we do a build --all --and-load.

This isn't necessary for 1.4.x, we can just create this file in the client projects for now and move on.

But it should absolutely be a part of our 1.5 release, right? This is easy and makes sense.

<?php use_helper('a','I18N') ?>
<h2><?php echo __('Error 404 &mdash; The page you are looking for could not be found.', null, 'apostrophe') ?></h2>
<h3><a href="/"><?php echo __('Go Home.', null, 'apostrophe') ?></a></h3>

<?php a_area('body', array(
	'global' => true, 
	'allowed_types' => array(
		'aRichText', 
		'aSlideshow', 
		'aVideo', 
		'aImage', 
	),
  'type_options' => array(
		'aRichText' => array('tool' => 'Main'), 	
		'aSlideshow' => array("width" => 480, "flexHeight" => true),
		'aVideo' => array('width' => 480, 'flexHeight' => true, 'resizeType' => 's'),		
		'aImage' => array('width' => 480, 'flexHeight' => true, 'resizeType' => 's'),
))) ?>

Change History

Changed 20 months ago by tboutell

It's great that this works.

Here's a thought: should rich text slots have a 'default-text' option
that allows you to programmatically specify their default text?

We could also solve it with fixtures for the 'global' page, yes.

Changed 17 months ago by tboutell

  • owner changed from boutell to tboutell

Changed 14 months ago by rickybanister

  • keywords error404, 1.5rc2 added; error404 removed
  • owner changed from tboutell to johnnyoffline
  • status changed from new to assigned

Changed 13 months ago by johnnyoffline

  • status changed from assigned to closed
  • resolution set to fixed

Admins can now customize the error404 page by browsing to:
 http://yoursite/admin/error404

http://grab.by/grabs/b10fbf9fdc7d97e03186203d541a3322.png

Old sites or existing sites without that page created will see the same old default error404 text we have always had.

When logged in as an admin you -can- also purposely browse to the wrong URL and also edit the pages contents.

Existing sites will have to have the /admin/error404 page created before that path will work.

Non-admin users cannot edit the 404 page as of right now, that makes sense to me.

Changed 13 months ago by johnnyoffline

The styles for the 404 page live in the sandbox because we would presumably want to customize them from project to project.

[3043]

The error404 template lives in the plugin.

[3044]

Note: See TracTickets for help on using tickets.