Code Monkey home page Code Monkey logo

neos-development-collection's Introduction

Code Climate StyleCI License Documentation Slack Discussion Forum Issues Translation Twitter

Neos development collection

FOR DOCS ON THE EVENT SOURCED CONTENT REPOSITORY, READ ON BELOW

This repository is a collection of packages for the Neos content application platform (learn more on https://www.neos.io/). The repository is used for development and all pull requests should go into it.

If you want to install Neos, please have a look at the documentation: https://neos.readthedocs.org/en/latest/

Contributing

If you want to contribute to Neos and want to set up a development environment, then follow these steps:

composer create-project neos/neos-development-distribution neos-development 8.3.x-dev --keep-vcs

Note the -distribution repository you create a project from, instead of just checking out this repository.

If you need a different branch, you can either use it from the start (replace the 8.3.x-dev by 9.0.x-dev or whatever you need), or switch after checkout (just make sure to run composer update afterwards to get matching dependencies installed.) In a nutshell, to switch the branch you intend to work on, run:

git checkout 9.0 && composer update

The code of the CMS can then be found inside Packages/Neos, which itself is the neos-development-collection Git repository. You commit changes and create pull requests from this repository.

In the root directory of the development distribution, you can do the following things:

To run tests, run ./bin/phpunit -c ./Build/BuildEssentials/PhpUnit/UnitTests.xml for unit tests or ./bin/phpunit -c ./Build/BuildEssentials/PhpUnit/FunctionalTests.xml for functional/integration tests.

Note

We use an upmerging strategy: create all bugfixes to the lowest maintained branch that contains the issue. Typically, this is the second last LTS release - see the diagram at https://www.neos.io/features/release-process.html.

For new features, pull requests should be made against the branch for the next minor version (named like x.y). Breaking changes must only go into the branch for the next major version.

For more detailed information, see https://discuss.neos.io/t/development-setup/504, https://discuss.neos.io/t/creating-a-pull-request/506 and https://discuss.neos.io/t/git-branch-handling-in-the-neos-project/6013

New (Event Sourced) Content Repository (ES CR)

Prerequisites

  • You need PHP 8.2 installed.
  • You need a recent MySQL/MariaDB (PostgreSQL ist not yet supported)
  • Please be sure to run off the Neos-Development-Distribution in Branch 9.0, to avoid dependency issues (as described above).

Setup

The ES CR has a Docker-compose file included in Neos.ContentRepository.BehavioralTests which starts both Mariadb and Postgres in compatible versions. Additionally, there exists a helper to change the configuration in your distribution (/Configuration) to the correct values matching this database.

Do the following for setting up everything:

  1. Start the databases:

    pushd Packages/Neos/Neos.ContentRepository.BehavioralTests; docker compose up -d; popd
    
    # to stop the databases:
    pushd Packages/Neos/Neos.ContentRepository.BehavioralTests; docker compose down; popd
    # to stop the databases AND remove the stored data:
    pushd Packages/Neos/Neos.ContentRepository.BehavioralTests; docker compose down -v; popd
  2. Copy matching Configuration:

    cp -R Packages/Neos/Neos.ContentRepository.BehavioralTests/DistributionConfigurationTemplate/* Configuration/
  3. Run Doctrine Migrations:

    ./flow doctrine:migrate
    FLOW_CONTEXT=Testing/Postgres ./flow doctrine:migrate
  4. Setup the Content Repository

    ./flow cr:setup
  5. Set up Behat

    cp -R Packages/Neos/Neos.ContentRepository.BehavioralTests/DistributionBehatTemplate/ Build/Behat
    pushd Build/Behat/
    rm composer.lock
    composer install
    popd

Site Setup

You can chose from one of the following options:

Creating a new Site

./flow site:create neosdemo Neos.Demo Neos.Demo:Document.Homepage

Migrating an existing (Neos < 9.0) Site

# WORKAROUND: for now, you still need to create a site (which must match the root node name)
# !! in the future, you would want to import *INTO* a given site (and replace its root node)
./flow site:create neosdemo Neos.Demo Neos.Demo:Document.Homepage

# the following config points to a Neos 8.0 database (adjust to your needs), created by
# the legacy "./flow site:import Neos.Demo" command.
./flow cr:migrateLegacyData --config '{"dbal": {"dbname": "neos80"}, "resourcesPath": "/path/to/neos-8.0/Data/Persistent/Resources"}'

# TODO: this JSON config is hard to write - we should change this soonish.

Importing an existing (Neos >= 9.0) Site from an Export

# import the event stream from the Neos.Demo package
./flow cr:import Packages/Sites/Neos.Demo/Resources/Private/Content

Running Neos

./flow server:run

Running the Tests

The normal mode is running PHP locally, but running Mariadb / Postgres in containers (so we know we use the right versions etc).

cd Packages/Neos
composer test:behavioral

Running all tests can take a long time, depending on the hardware. To speed up the process, Behat tests can be executed in a "synchronous" mode:

composer test:behavioral:sync

Alternatively, if you want to reproduce errors as they happen inside the CI system, but you develop on Mac OS, you might want to run the Behat tests in a Docker container (= a linux environment) as well. We have seen cases where they behave differently, i.e. where they run without race conditions on OSX, but with race conditions in Linux/Docker. Additionally, the Linux/Docker setup described below also makes it easy to run the race-condition-detector:

docker compose --project-directory . --file Packages/Neos/Neos.ContentRepository.BehavioralTests/docker-compose-full.yml build
docker compose --project-directory . --file Packages/Neos/Neos.ContentRepository.BehavioralTests/docker-compose-full.yml up -d
docker compose --project-directory . --file Packages/Neos/Neos.ContentRepository.BehavioralTests/docker-compose-full.yml run neos /bin/bash

# the following commands now run INSIDE the Neos docker container:
FLOW_CONTEXT=Testing/Behat ../../../../../flow raceConditionTracker:reset

../../../../../bin/behat -c behat.yml.dist

FLOW_CONTEXT=Testing/Behat ../../../../../flow raceConditionTracker:analyzeTrace

neos-development-collection's People

Contributors

aertmann avatar ahaeslich avatar albe avatar bjen avatar bwaidelich avatar comir avatar daniellienert avatar dfeyer avatar dimaip avatar dlubitz avatar foerthner avatar gerhard-boden avatar hlubek avatar johannessteu avatar jonnitto avatar kdambekalns avatar kitsunet avatar markusguenther avatar mattiasnilsson avatar mficzel avatar mgoldbeck avatar mhsdesign avatar neos-bot avatar neos-project avatar nezaniel avatar robertlemke avatar rolandschuetz avatar sebobo avatar skurfuerst avatar weblate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neos-development-collection's Issues

`layout` sliding query does not match properly

Jira issue originally created by user afoeder:

The page layout determinition in TYPO3.Neos/Resources/Private/TypoScript/DefaultTypoScript.ts2 contains the query

bq. q(node).parents('[subpageLayout]').first().property('subpageLayout')

However that would immediately also match nodes which have subpageLayout being an empty string, hence this being taken into account. At the end we would have an empty value even if there would be actual set layouts more above in the rootline.

The .parents() part should be replaced with

bq. .parents('[subpageLayout][subpageLayout != ""]')

Jira-URL: https://jira.neos.io/browse/NEOS-290

EEL Syntax error returns null property value instead of showing an error

Jira issue originally created by user @bjen:

When creating a syntax error in EEL it doesn't show errors or any hints that something went wrong but simply ignores the affected properties.

Example:

attributes.class = ${q(node).property('color') ' ' (q(node).property('overflowHidden') ? 'overflow-hidden' : '') (q(node).property('noPaddingTop') ? ' no-padding-top' : '')} (q(node).property('overflowHidden') ? ' no-padding-bottom' : '')}

In this case there is a double curly bracket behind the padding-top property. This leads to all classes being not rendered anymore but no error or hint is shown.

Jira-URL: https://jira.neos.io/browse/NEOS-137

Reference manual for REST services

Jira issue originally created by user @robertlemke:

As a developer I want a reference manual which gives me an overview of the existing Neos REST services and their API.

This story is about kickstarting such a manual and adding some initial services - as far as they exist already.

Further services are then documented while refactoring or creating them as part of other stories.

Jira-URL: https://jira.neos.io/browse/NEOS-191

As a content editor I want to relate a varying number of images / assets to a content node

Jira issue originally created by user @robertlemke:

  • new node type Text with Images (or extend Text with Image)

  • instead of selecting one image, I can click a "+" button to add another image

  • images are displayed as a list in the inspector panel, with tiny square thumbnail and title (?)

  • an image can be selected from the list by clicking on it and then shows up with the big thumbnail and image editor functionality

  • the image list provides a button for removing the relation to that image

    Jira-URL: https://jira.neos.io/browse/NEOS-40

Control access to Neos modules via Policy

UPDATE (5th May 2017):
I just renamed this ticket from "As a Neos Administrator I want to control access to modules" (https://jira.neos.io/browse/NEOS-27).

Background:
Currently access to Neos modules is controlled via a privilegeTarget (used to be resource) option in the module configuration.
As preparation to make this more flexible (and possibly configurable via Backend) those module privileges should be configured in the Policy.yaml solely.

In order to be able to configure ACL via the Neos Backend (that is: during "runtime") we'll need neos/flow-development-collection#593

Consistent behavior of node structure across content dimensions

Jira issue originally created by user @hlubek:

The node structure (per workspace) should always be consistent across different content dimensions. For a more consistent and reliable behavior we should not allow a different path for a node in different dimensions.

Reasons:

  • A moved node in one dimension might belong to another node and the user is not aware of the connection

  • Shine-through nodes from dimensions with a different structure are not considered correctly with a path-based query, which leads to unexpected results

    Jira-URL: https://jira.neos.io/browse/NEOS-369

lastVisitedUri mechanism does not consider content dimensions

Jira issue originally created by user @robertlemke:

The lastVisitedUri cookie currently only stores the node identifier and not the content dimension values.

Steps to reproduce:

  • go to content module
  • switch website language to some other than the default language
  • to to workspaces module
  • got co content module via the module selector or go to http://yoursite/neos

-> currently selected language is the default one

Jira-URL: https://jira.neos.io/browse/NEOS-312

Content-Cache flushes entries for all workspaces when editing nodes

Jira issue originally created by user @hlubek:

Creating / updating / deleting a node in the user workspace will flush all cache entries for the node and associated tags. The cache entries are tagged with the node identifier or as a descendant of a node (e.g. for ContentCollection) not taking the workspace name into account. This way a change will always flush all cache entries regardless of the workspace.

In the worst case one or more editors working on the page can cause a live site to perform bad because of missing cache entries while accessing the site.

An idea would be to add the workspace name to the tags that are flushed (for the workspace hierarchy), so the default cache configuration would need to be changed to take the workspace of the node context into account.

Jira-URL: https://jira.neos.io/browse/NEOS-241

Inline Editable

Jira issue originally created by user pumatertion:

What exactly happens with all the meta data added to a wrapping element like

f.e.? Why is this needed?

How to use the inline editable viewHelper?

How to use processing in ts to make something inline editable?

Jira-URL: https://jira.neos.io/browse/NEOS-464

Custom server-side validation for node properties

Configuring validators for a node type property has no effect besides validating the input in the user-interface. The validation rules should be enforced both on the server-side and the client-side to prevent inconsistent data.

We need an extensible but easy way to configure both the client-side and server-side validation logic to use for a given validation type.

Update from 2019-12-04:
With neos/neos-ui#2351 The default validators (Neos.Neos:...) are applied on the server-side, too. But that is currently not configurable and does not work for custom validators.

Related: #2349, #2348

Unpublished node count includes auto created nodes

Jira issue originally created by user @radmiraal:

When an editor adds a new node it will trigger a list of new nodes if the nodetype has configured childNodes. This will lead to confusion because all those nodes are counted in the publish menu.

The auto created childnodes should be ignored while counting the unpublished actions, although they should be included in the count as 1 with the document. So if only one thing a auto created child node is modified on the page, it should count as one. If the parent and a auto created child node is modified it should also count as one.

Jira-URL: https://jira.neos.io/browse/NEOS-360

Allow edit and preview in separate windows

Jira issue originally created by user @hlubek:

Right now the edit, preview and UI settings are stored in the session (or at least globally). It's not possible to have one window or tab with an editing mode and one window with a preview mode open at the same time (unless the page is never reloaded). This is very annoying when testing JavaScript-heavy sites, where some scripts need the preview mode to test content changes. Besides that an editor or site integrator might want to choose that working mode instead of working in a single window.

We should find a way to use the window name to differentiate the browser windows or tabs.

Jira-URL: https://jira.neos.io/browse/NEOS-272

As a developer I want to have a clear overview of resources and actions

Jira issue originally created by user @radmiraal:

If we want to implement a good REST interface it's important to have a clear overview of all the resources / services we need. For that we should kickstart Behat features with:

  • 1 Feature definition for every resource

  • All possible scenarios we can think of we need to support with the current UI / featureset

  • All possible scenarios we need in the near future

    Jira-URL: https://jira.neos.io/browse/NEOS-196

Keyboard shortcut in tooltip

Jira issue originally created by user xperseguers:

When hovering a UI item (maximize, open toolbar, ...) it would be helpful to have a way to append the corresponding keyboard shortcut so that using the same UI command over and over again makes automatically learn the corresponding shortcut after a while.

Jira-URL: https://jira.neos.io/browse/NEOS-353

Make 404 pages editable instead of static

Jira issue originally created by user mrimann:

As a visitor of a Neos based website
I expect a "404 not found" page with some content/navigation in the design of the visited site
in order to further navigate past the "not found" page

In addition:
As a website operator
I want to be able to edit the content (e.g. error message) of the "404 not found" page from within Neos like every other page

Side-Note: This seems to be a often seeked feature, see http://forum.typo3.org/index.php/t/196775/ - so far the solution with a custom built template is fine and solves the first part. But not yet the second part.

I see two ways to solve this:

  • extend the proposed TypoScript snippet to internally fetch the output of a configured content page (e.g. /error-404), after rendering it from Neos

  • publish a howto article on how to achieve this with pure fluid and the existing TypoScript setup (where one can only point to a specific template file)

    Jira-URL: https://jira.neos.io/browse/NEOS-403

Permission Management UI

Jira issue originally created by user andi:

  • Add meta information like icon, description, etc. to roles and privilege targets
    **** roles can be abstract, and are then not directly asignable/exposed to the UI

  • Make it possible to assign parameters to a role and assign that to an account in the user interface
    **** Depending on the parameter type, a specialized interface (selector of modules, node tree, etc.) is provided to configure the parameter in the UI

    Jira-URL: https://jira.neos.io/browse/NEOS-162

Special node types should have the possibility of automatic sorting

Jira issue originally created by user @hlubek:

For many node types like news, events and others, the natural sorting order is by date. It is error prone to have the editor sort the node in the tree into the correct position. There should be a mechanism to configure a sort function for a node type that should be used to position the node.

This will not work reliably if different node types exist on the same level because no order is defined for these nodes. This needs an additional thought.

Jira-URL: https://jira.neos.io/browse/NEOS-383

Exception while trying to export deactivated node types

Jira issue originally created by user just2b:

I started with the dummy package and deactivated that. everything fine.

If I want to export the site with {./flow Site:export} I end up with the exception

Uncaught Exception
  The node type "TYPO3.NeosDemoTypo3Org:Chapter" is not available.

More Information
  Exception code      #1316598370
  File                /var/www/sites/TYPO3-Neos-1.1/Data/Temporary/Development/Cache/Code/Flow*Object_Classes/TYPO3_TYPO3CR_Domain_Service*NodeTypeManager.php line 104
  Exception reference #201407032127482012c5

which is of course true but either those nodes should be exported as disabled or just should be ignored.

Jira-URL: https://jira.neos.io/browse/NEOS-212

Fatal errors after persistAll are hidden from client

Jira issue originally created by user @hlubek:

If an operation throws an exception or even worse a fatal error (which is not logged into the Flow system log) in the request shutdown sequence (this is where persistAll is usually called), the error will not be noticed.

One example occurred where publishing a workspace seems to work from the HTTP status code and response, but no changes were made. This happened because of a "hidden" fatal error that was not shown in the AJAX response.

Jira-URL: https://jira.neos.io/browse/NEOS-266

Improve the Edit / Preview tab UI

Jira issue originally created by user rasmusskjoldan:

If a user has a Preview mode selected, collapses the Edit / Preview panel, tries to edit content but is not aware of the Preview mode being selected, there is insufficient UI feedback.

It might be needed that we need to do more tasks to solve this but to start with we need to introduce the following changes:

• Use 2 different colors for both Edit / Preview labels and the mode buttons
• All Edit mode buttons keep the same primary color
• All Preview mode buttons should be green (#ff8700)
• Mark the active Edit / Preview category corresponding to the selected mode: If a Preview mode is selected and the Edit / Preview panel is collapsed, then the label "Preview" in the tab is both bold and #ff8700. If an Edit mode is selected the "Edit" label is both bold and blue

See attached designs.

Atachements:

Jira Image
Jira Image
Jira Image

Jira-URL: https://jira.neos.io/browse/NEOS-112

Images with links causes problems when clicking the image

Jira issue originally created by user @aertmann:

When a image has a link on it, clicking the image will result in going directly to the image which will lead to an error being shown. The problem is that it's not possible to add the overlay over the image to prevent clicking the link, because there could be other properties (caption, text) that needs to be clickable. We need to come up with a concept for how to handle links in the backend and how to make it possible to click them in some scenarios and not in others.

Concept: Seeing as this only happens for external links since the _linkInterceptionHandler in Application.js behaves differently for local links, we could handle external links differently. By registering a click interceptor on double click instead of click, opening external links then require double click. This interceptor should although be bound only to content elements / document elements since that is needed for anything to be editable anyway.

Jira-URL: https://jira.neos.io/browse/NEOS-358

Endless backend loading on element creation (empty template)

Jira issue originally created by user :

As I created a new NodeType and the corresponding Fluid Template that should output the content I got an endless backend loading as I wanted to create the element in the backend.

This is the code in the Fluid template:
<f:if condition="{content}">
{content -> f:format.raw()}
/f:if

So if the Template content is empty it causes the backend to load endlessly on element creation.

Atachements:

Jira Image

Jira-URL: https://jira.neos.io/browse/NEOS-136

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.