Code Monkey home page Code Monkey logo

sitegeist.movealong's Introduction

Sitegeist.MoveAlong

Render 4xx status pages via fusion

Configuration

The status codes that are handled via fusion error-rendering can be controlled via settings.

Neos:
  Flow:
    error:
      exceptionHandler:
        renderingGroups:
          notFoundExceptions:
            matchingStatusCodes: [ 403, 404, 410 ]

The fusion code that actually renders the error-message.

#
# Main error matcher
#
error = Neos.Fusion:Case {

	#
	# Find the document to render in case of 404
	#
	@context.notFoundDocument = ${q(site).children('[instanceof Neos.Neos:Document]').filter('[uriPathSegment="404"]').get(0)}

	#
	# Custom matcher for 404 status
	#
	4xx {
		@position = 'start'
		condition = ${statusCode >= 400 && statusCode < 500 && notFoundDocument}
		renderer = Neos.Fusion:Renderer {
			@context.node = ${notFoundDocument}
			@context.documentNode = ${notFoundDocument}
			renderPath = '/root'
		}
	}

	#
	# Default rendering of classic error-message
	#
	default {
		@position = 'end 9999'
		condition = true
		renderer = Sitegeist.MoveAlong:ErrorMessage
	}
}

Authors & Sponsors

The development and the public-releases of this package is generously sponsored by our employer http://www.sitegeist.de.

Installation

Sitegeist.MoveAlong is available via packagist. Just run composer require sitegeist/movealong. We use semantic-versioning so every breaking change will increase the major-version number.

License

see LICENSE file

sitegeist.movealong's People

Contributors

grebaldi avatar jonnitto avatar kdambekalns avatar mficzel avatar mstruebing avatar skurfuerst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sitegeist.movealong's Issues

404 status code not set

I know the problem is explicitly described in the README, but it still does not work on my installation. Even after adding a property is404Page to the Page NodeType and adding the Fusion lines to my Root.fusion

bildschirmfoto 2017-10-13 um 16 59 20

Error 500 with Neos 3.3 LTS

Have an error 500 with misstyping uri's also after rm temporary and rescan:

Exception Code    0
Exception Type    TypeError
Thrown in File    Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Neos_Flow_Mvc_Routing_Router.php
Line    101
Original File    Packages/Framework/Neos.Flow/Classes/Mvc/Routing/Router.php

Differences into line 101 Neos 3.2 <--> 3.3:
Neos 3.2 > public function route(Request $httpRequest) (line 98)
Neos 3.3 > public function route(RouteContext $routeContext): array

Information from Martin Ficzel (Plguin-dev) on slack-channel:
Yeah, i fear we will habe to update moveAlong. No big deal but i have to find the time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.