GithubHelp home page GithubHelp logo

sulu-demo's Introduction

Sulu - Demo Website

This is the official Sulu Demo. It was created to show a simple implementation of an application made with Sulu and explains the basic steps.

This project also runs here: https://sulu.rocks

For information about Sulu have a look at our Homepage: http://sulu.io/

Our documentation is available under: http://docs.sulu.io/


Sulu Demo Slideshow


Used Extensions

The SuluArticleBundle adds support for managing articles in Sulu. Articles can be used in a lot of different ways to manage unstructured data with an own URL in an admin-list. Most of the features, which can be used in pages, can also be used on articles - like templates, versioning, drafting, publishing and automation.

The SuluAutomationBundle provides a way to manages future tasks which can be scheduled for entities in the Sulu-Admin. For example schedule the publishing of a page to a specific datetime in the future.

To enable automated tasks use the command task:run manually in the terminal or in a cronjob. This tasks executes the pending automation tasks (see SuluAutomationBundle Installation Docs).

A collection of helpful twig extensions and a tiny js component mangaement library.

Requirements

  • PHP 8.0
    • json extension
    • xml extension
    • simplexml extension
    • gd or imagick extension (needed for image converts)
  • MySQL or PostgreSQL Server
  • Elasticsearch 7
  • Composer
  • NPM if you want to run npm tasks

Installation

git clone [email protected]:sulu/sulu-demo.git
cd sulu-demo
composer install

Configure required services

The demo requires a running MySQL and ElasticSearch instance.

Configure your DATABASE_URL and ELASTICSEARCH_HOST in the .env.local see .env as reference.

If you don't want to install the services yourself you can use the provided docker-compose.yml to start this services inside an own container:

docker-compose up

Install fixtures

Install the demo with all fixtures by running:

bin/console sulu:build dev

Usage

Now you can try out our demo, there is no need to configure a virtual host. Just use the build in web servers:

php -S 127.0.0.1:8000 -t public config/router.php

Then you can access the administration interface via http://127.0.0.1:8000/admin. The default user and password is “admin”.

The web frontend can be found under http://127.0.0.1:8000.

Tests

composer bootstrap-test-environment
composer lint
composer test

Questions? We have answers!

We've got a #Slack channel where you can talk directly to strategists, developers and designers.

sulu-demo's People

Contributors

alexander-schranz avatar luca-rath avatar niklasnatter avatar nyholm avatar prokyonn avatar rogoit avatar wachterjohannes 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

Watchers

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

sulu-demo's Issues

Add Docker support

I have found your repository and have tried to make it up and running.

It is a pain.

Add Docker and Docker-compose support for your development environment.

Something like this will be a good start:

version: '3.1'

services:

  sulu-01:
    container_name: sulu-01
    build: ./env-config
    ports:
      - '15300:80'
    volumes:
      - '.:/var/www/html'
      - './env-config/apache/000-default.conf:/etc/apache2/sites-available/000-default.conf'
      - './env-config/composer.phar:/usr/bin/composer'
    depends_on:
      - sulu-mysql-master
      - sulu-elasticsearch-master

  sulu-elasticsearch-master:
    container_name: sulu-elasticsearch-master
    hostname: sulu-elasticsearch-master
    image: docker.elastic.co/elasticsearch/elasticsearch-platinum:6.1.2
    ports:
      - '15302:9200'
    ulimits:
      memlock:
        soft: -1
        hard: -1
    environment:
      - discovery.type=single-node
      - cluster.name=docker-cluster
      - bootstrap.memory_lock=true
      - xpack.security.enabled=false
    volumes:
      - '.persistence/elasticsearch/5:/data/sw/elasticsearch/data'

  sulu-mysql-master:
    container_name: sulu-mysql-master
    hostname: sulu-mysql-master
    image: 'mysql:5'
    ports:
      - '15301:3306'
    environment:
      MYSQL_USER: suluadmin
      MYSQL_DATABASE: sulu
      MYSQL_PASSWORD: 12345
      MYSQL_ROOT_PASSWORD: 54321
    volumes:
      - '.persistence/mysql/5:/var/lib/mysql'

Meanwhile, if I accomplish working environment, I will try to create a PR for this.

Improve theme and add content

In the topic, think about adding pages like:

  • Home
  • About us
  • Contact us, (avec une carte Google maps)
  • Our team,
  • Our realizations,
  • Our services,
  • log in (member area),
  • Portfolio,
  • Our agency,
  • ...

Install SULU Demo on Laravel Homestead

Hi all!
I'm tring to install sulu-demo on Laravel Homestead VM
php version 8.1 according .php-version
elasticsearch version 7.9.0
sulu version 2.5.9

While executing the command:

$ bin/console sulu:build dev

I get error:

Build Targets
=============
+---+--------------------+------------------------------------------------------------------------------------------------+
| # | Builder          | Deps                                                                                           |
+---+--------------------+------------------------------------------------------------------------------------------------+
| 0 | article_index |                                                                                                |
| 1 | database       |                                                                                                |
| 2 | phpcr             | database                                                                                       |
| 3 | phpcr_migrations   | phpcr                                                                                          |
| 4 | fixtures          | database, phpcr                                                                                |
| 5 | user                | fixtures, database                                                                             |
| 6 | system_collections | database, fixtures                                                                             |
| 7 | security          | fixtures, database                                                                             |
| 8 | dev                  | article_index, database, fixtures, phpcr, user, phpcr_migrations, system_collections, security |
+---+--------------------+------------------------------------------------------------------------------------------------+

Options:

  - nodeps: false
  - keep-exit-code: false
  - destroy: false
  - help: false
  - quiet: false
  - verbose: false
  - version: false
  - ansi: NULL
  - no-interaction: false
  - env: 'dev'
  - no-debug: false

Look good? (y)

Executing builders
==================

Target: article_index

    Create index for "live" manager.
    
    In Connection.php line 693:
                                                                                                                            
      {"error":"Content-Type header [application/vnd.elasticsearch+json;compatible-with=7] is not supported","status":406}  
                                                                                                                            
    
    sulu:build [-D|--nodeps] [-k|--keep-exit-code] [--destroy] [--] [<target>]

How to fix this error?

Thanks

Example PR how to add "enabled" to ContactAdmin Contact List view

Q A
Bug? no
New Feature? no
Sulu Version 2.5+

Actual Behavior

Sulu Contact List does not have enabled flag shown by default.
Can't find a way to enable user via administration frontend application.
image

What I would like to see

  1. In my administration frontend application, I would like to see if contact is "enabled" or not according to se_users.enabled
  2. Possibility to make user enabled via administration application.

Could you please add example PR for managing "enabled" ?

Webspace "preview not available"

After successful elasticsearch configuration and reinstalling application with:

bin/adminconsole --env=dev app:install --destroy

What should I add to elasticsearch to enable site live preview?
After code review, I assumed it is a missing teaser-like index. If it is not an elastic issue, please instruct me.

screenshot_2018-01-22_17-48-12

Relevant trace

screenshot_2018-01-22_18-03-54

GET http://localhost:15300/admin/api/teasers?ids=article;7685578a-4a8b-4370-a727-6ffaa09d96af,content;7f25ae1f-e7d0-4ac2-90a7-a11d8cd88e8c&locale=de

Also, does live preview corresponds to ongr_elasticsearch.managers.live section in config.yml?

Add sulu demo to packagist

I try to install the demo website with composer (php composer create-project sulu/sulu-demo). It did not work, and I have this message :

Could not find package sulu/sulu-demo with stability stable.

It seems it's because the package is not available on packagist.

UnitOfWork break issue

Actual error on demo installation

In UnitOfWork.php line 2636:

Warning: "continue" targeting switch is equivalent to "break". Did you mean
to use "continue 2"?

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception

[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:

In UnitOfWork.php line 2636:

Warning: "continue" targeting switch is equivalent to "break". Did you mean    
 to use "continue 2"?                                                          

Add Elasticsearch configuration

Not all elasticsearch instances are at localhost:9200, so you need to specify in config.yml at least host and port keys.

Naturally, values should be specified in parameters.yml.

parameters.yml

parameters:
    ....
    elastica.master.host: master.sulu-elasticsearch-master.com
    elastica.master.port: 9200
    elastica.node-01.host: node-01.sulu-elasticsearch-master.com
    elastica.node-01.port: 9200
    ....

config.yml

ongr_elasticsearch:
    ...
    managers:
        default:
            index: 
                hosts:
                    - '%elastica.master.host%:%elastica.master.port%'
                    - '%elastica.node-01.host%:%elastica.node-01.port%'
            ...

"addRouterAttributesToFormRequest()" does not forward parameter to controller when using "createFormViewBuilder()"

Q A
Bug? Yes
New Feature? no
Sulu Version Sulu 2.5
Browser Version Chrome Version 121.0.6167.185

Actual Behavior

When following this example : https://github.com/sulu/sulu-demo/pull/106/files
WebspaceSettingController.php uses request to check for permission with getSecurityContext() and the webspace parameter.
In this case the webspace parameter doesn't exist

Expected Behavior

Webspace parameter should be forwarded from the FromView with the "addRouterAttributesToFormRequest()" method.

Steps to Reproduce

You can follow the example https://github.com/sulu/sulu-demo/pull/106/files.
You should get an error 403 when accessing the tab in admin BO saying : "context 'sulu.webspaces..setting"
Between the 2 dots is supposed to be the webspace key of the webspace selected in the Back Office.

Possible Solutions

It seems to be in the javascript part of Sulu but i did not investigate it more because of a lack of knowledge here

Add pagination example to Artists and Blogs

Q A
Bug? no
New Feature? yes
Sulu Version Specific version or SHA of a commit
Browser Version Browser name and version

Actual Behavior

There is currently no example about usage of hasNextPage of example which is required for a list of a lot of news or articles.

Expected Behavior

Add example for articles blogs smart content and artists pages example.

Unable to manage webspace content due to disabled controls

By opening url /admin/#content/contents/__MY_WEBSPACE__/__MY_LOCALE__ I am presented with pages I should be able to manage, yet all page controls are disabled: Delete page, Move page, Copy page, Order pages.

I have tried to:

  • Create draft page and manage it
  • Create published page and manage it

Both scenarios have disabled controls after page creation.

It is possible to manually remove html attributes disabled and manage them, but it is not an option.

Visual:
screenshot_2018-01-23_18-12-50

Compile Error: Cannot use 'Object' as class name as it is reserved

After asset install cmd on PHP7.2

Fatal error: Cannot use 'Object' as class name as it is reserved in /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/ongr/elasticsearch-bundle/Annotation/Object.php on line 23

Call Stack:
0.0004 390776 1. {main}() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/bin/adminconsole:0
0.0090 1258296 2. include('/Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/bin/console.php') /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/bin/adminconsole:7
0.0229 2383024 3. Symfony\Bundle\FrameworkBundle\Console\Application->run() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/bin/console.php:23
0.0386 2788928 4. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:148
0.0386 2788928 5. AdminKernel->boot() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:64
0.0630 3586616 6. AdminKernel->initializeContainer() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:135
0.2624 10277488 7. Symfony\Component\DependencyInjection\ContainerBuilder->compile() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:641
0.2740 10281248 8. Symfony\Component\DependencyInjection\Compiler\Compiler->compile() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:778
1.7288 27419360 9. ONGR\ElasticsearchBundle\DependencyInjection\Compiler\MappingPass->process() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:141
1.7288 27419360 10. Symfony\Component\DependencyInjection\ContainerBuilder->get() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/ongr/elasticsearch-bundle/DependencyInjection/Compiler/MappingPass.php:32
1.7288 27419360 11. Symfony\Component\DependencyInjection\ContainerBuilder->doGet() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:588
1.7289 27419384 12. Symfony\Component\DependencyInjection\ContainerBuilder->createService() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:623
1.7289 27419760 13. Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:1134
1.7305 27443304 14. Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:1221
1.7305 27443304 15. Symfony\Component\DependencyInjection\ContainerBuilder->doGet() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:1264
1.7305 27443304 16. Symfony\Component\DependencyInjection\ContainerBuilder->createService() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:623
1.7370 27945344 17. ReflectionClass->newInstanceArgs() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:1159
1.7370 27945536 18. ONGR\ElasticsearchBundle\Mapping\DocumentParser->__construct() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:1159
1.7370 27945536 19. ONGR\ElasticsearchBundle\Mapping\DocumentParser->registerAnnotations() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/ongr/elasticsearch-bundle/Mapping/DocumentParser.php:81
1.7376 27961456 20. Doctrine\Common\Annotations\AnnotationRegistry::registerFile() /Users/rocket/development/nevercodealone/cms/sulu/sulu-demo/vendor/ongr/elasticsearch-bundle/Mapping/DocumentParser.php:411

Unable to login in admin

On a fresh install with default user and roles an attempt to login as admin (with pass admin) keep redirecting me to login page.

From bottom to top: login page, successful login, admin index page, redirect to login.
screenshot_2018-01-19_13-56-02

Profiler shows valid user token on login_check, but anonymous later.

var directory is freely writable/readable.

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.