Code Monkey home page Code Monkey logo

sulu-minimal's Introduction

This repository is no longer the recommended way to start a sulu project. Please have a look at the documentation to find out how to start a new project using the new sulu/skeleton repository.

Sulu 1.6.x Minimal Edition

GitHub license GitHub tag (latest SemVer) Test workflow status

Welcome to the Sulu Minimal Edition - the skeleton to start a new Sulu project.

Getting started

Starting a new Sulu project is explained in our documentation.

Issues

Submit any sulu related issues to the sulu/sulu repository.

sulu-minimal's People

Contributors

alexander-schranz avatar chirimoya avatar danrot avatar dmetzler1988 avatar ggioffreda avatar kfrohwein avatar luca-rath avatar niklasnatter avatar renezumtobel avatar sagikazarmark avatar wachterjohannes avatar webmozart 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

Watchers

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

sulu-minimal's Issues

Var folder in composer.json

The "symfony-var-dir": "web" of the composer.json file should be set to var. Be aware of the the following files will move from web to var:

  • bootstrap.php.cache
  • SymfonyRequirements.php

Could not load structure type "overview"

While following the getting started/installation guide I got the following error when running bin/adminconsole sulu:build dev:

[Sulu\Component\Content\Metadata\Factory\Exception\StructureTypeNotFoundException]
Could not load structure type "overview" for document type "home", looked in "__PATHOBDUSCATED__/SuluTest2/app/Resources/templates/pages"  
[InvalidArgumentException]                                                                                                          
The file "overview.xml" does not exist (in: __PATHOBDUSCATED__/SuluTest2/app/Resources/templates/pages)

The dev build did not finish and my test project was broken. I was able to solve this by copying app/Resources/pages/overview.xml.dist from sulu/sulu-standard to app/Resources/templates/pages/overview.xml of my sulu/sulu-minimal install.

I am not sure if the file I copied has exactly the same contents, but this solved my problem.
Is there a problem in sulu/sulu-minimal or did I not copy the right version from composer?
I am an experienced developer and I followed the guide line by line. I did not modify your composer commnads.

Update deprecated SEO twig functions

This caught me out when I was trying to get SEO working for articles. Because the twig function is strict typed, the content object (not array) in articles was making it blow up. @alexander-schranz pointed me in the right direction on an unrelated issue. PR to follow.

Memory error when installing `sulu-minimal` via Composer

Q A
Bug? yes
New Feature? no
Sulu Version 1.6.22 of sulu-minimal
Browser Version Console

Actual Behavior

When installing sulu-minimal over the console via Composer I get a memory error:

Installing sulu/sulu-minimal (1.6.22)
  - Installing sulu/sulu-minimal (1.6.22): Loading from cache
Created project in sulutest
Loading composer repositories with package information
Updating dependencies (including require-dev)
PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 67108864 bytes) in phar:///usr/lib/plesk-9.0/composer.phar/src/Composer/DependencyResolver/Solver.php on line 220

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 67108864 bytes) in phar:///usr/lib/plesk-9.0/composer.phar/src/Composer/DependencyResolver/Solver.php on line 220

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.

Expected Behavior

Should install correctly and without a memory leak.

Steps to Reproduce

  • Debian 8.11
  • Plesk Onyx 17.8.11 Update Nr. 27
  • PHP version: 7.2.11 (CLI)
  • Composer version: 1.7.2

Also reproduced on local machine:

  • macOS 10.12.6
  • PHP version: 7.2.7 (CLI)
  • Composer version: 1.7.2

Possible Solutions

Editing the locally stored php.ini of the corresponding PHP version, but Composer installation shouldn't run into a memory problem.

twig recompile on dev environment

Twig templates not recompiled on dev environment.
It fixed by override auto_reload configuration parameter.

# Twig Configuration
twig:
          debug:            "%kernel.debug%"
          strict_variables: "%kernel.debug%"
+++    auto_reload:      1

But it mast been "%kernel.debug%" by default. And "%kernel.debug%" mast been 1. What happens?

My command
bin/websiteconsole server:run --env=dev
php 7.0.22
ubuntu 16.04

Sulu CMS 1.6 `Search indexes “page_example_published” not known.` error (1.5 works)

Hello, I've faced strange behavior of sulu-minimal project, I am installing sulu-minimal 1.5 - indexing of massive_page_example_published-en-i18n and search field on client homepage works as expected, sulu-minimal 1.6 gives an error Search indexes "page_example_published" not known. Known indexes: "page", "contact" and only massive_contact and massive_page-en-i18n indexes are created.

P.S. tried purging and rebuilding indexing with no errors, cleared cache, installed barebone repo from scratch both locally (PHP7.2) and on docker containers (PHP7.1)... now I just got stuck

Example projects I have also tested:

Unable to edit, delete or move a content page in a new added webspace

Q A
Bug? yes
New Feature? no
Sulu Version 1.3.0
Browser Version Chrome, FF, ...

Actual Behavior

Content pages can be added but not edited or deleted.

Expected Behavior

Can edit a content page which i self added before.

Steps to Reproduce

  1. Inatall Sulu Minimal
  2. sulu:build dev
  3. add new webspace
  4. sulu:build dev
  5. add a content page
  6. try to edit it

Automate tagging a release

As can be read on https://getcomposer.org/doc/04-schema.md#version:

The version of the package. In most cases this is not required and should be omitted (see below).
[...]
Optional if the package repository can infer the version from somewhere, such as the VCS tag name in the VCS repository. In that case it is also recommended to omit it.

and

Note: Packagist uses VCS repositories, so the statement above is very much true for Packagist as well. Specifying the version yourself will most likely end up creating problems at some point due to human error.
#26 shows this human error.

Admin Login page blank after following "Getting Started" instructions

After following the instructions in the Getting Started section of the documentation, I try to navigato towards the admin section (http://localhost/admin). It gets redirection towards /admin/login, and I am presented with a (seemingly) blank page. The page source does provide a few HTML tags, but nothing is being displayed.

Did I miss the installation of some frontend framework or something?

ProxyManager FileNotWritableException

I follow the Getting Started guide to install the sulu-minimal. Everything went well until I try to add a new page. The page was created but I couldn't access to it. It throws me an exception when I'm trying to access to it:

FileNotWritableException in vendor/ocramius/proxy-manager/src/ProxyManager/GeneratorStrategy/FileWriterGeneratorStrategy.php (line 98)

Could not write to path "/home/my-project/var/cache/website/dev/sulu/proxies/ProxyManagerGeneratedProxy__PM__SuluBundleContentBundleDocumentHomeDocumentGeneratedfab3c42b03aa8246cf7ce59722a4c211.php.59875689ac1952.50755017": path does not exist

I tried to create this file manually (from a terminal) and it said the filename was to long for the system (I'm running on Ubuntu 16).
So inside the file FileWriterGeneratorStrategy.php, I change uniqid('', true) to uniqid('', false) to reduce the length.
With this simple hack, everything went well !

However, is there a cleaner solution for it ?

Thanks !

.env file not found at composer create project

Q A
Bug? yes
New Feature? no
Sulu Version 2.0.0-alpha4

Actual Behavior

When you run composer create project, you get an error that the .env file was not found.

Expected Behavior

The normal behavior should be that the .env.dist should be copied to .env.

Steps to Reproduce

Run composer create-project sulu/sulu-minimal:2.0.0-alpha4

No admin dashboard

After install development branch version, frontend work as expected but the admin dashboard is missing, empty white screen, after success login and profiler shows user is anon. Does new version 2.0 uses encore with yarn or npm?

Cannot add new media folder - forbidden due to permissions

Hello,
I'm trying the sulu-minimal package and all is going well, except for media. I can't add any media folder and (supposedly) uploaded images are not listed. When creating media folder there is an error message: "Operation forbidden The available permissions are not sufficient for this operation". When uploading there is no error, to the contrary - there is a thumbnail and success message but afterwards there is no entry on the media list, just circles pulsing.

At first I ensured that all the Sulu project directory has user:www-data 777 permissions. Then I checked and default admin has role User. I added "pl" localization but admin has permissions for both "en" and "pl". Also, User role has all the permissions on.

In the webspace XML file I have:

[...]
    <localizations>
        <localization language="en"/>
        <localization language="pl" default="true"/>
    </localizations>
[...]
    <portals>
        <portal>
            <name>example.com</name>
            <key>example</key>

            <environments>
                <environment type="prod">
                    <urls>
                        <url language="pl">{host}</url>
                        <url language="en">{host}/en</url>
                    </urls>
                </environment>
[...]

Is it some bug or is it something on my side?

`./bin/console cache:clear` fails when running Sulu minimal on vagrant

I am trying to get Sulu (minimal) running on a vagrant box. For performance reasons, I define custom paths for the log and cache directories in order to get them out of the synced vagrant folder:

In /app/AbstractKernel.php:

public function getCacheDir()
{
    if (in_array($this->environment, array('dev', 'test'))) {
        return '/run/shm/website/cache/' .  $this->environment;
    }

    // Sulu default
    return dirname($this->rootDir) . DIRECTORY_SEPARATOR
        . 'var' . DIRECTORY_SEPARATOR
        . 'cache' . DIRECTORY_SEPARATOR
        . $this->getContext() . DIRECTORY_SEPARATOR
        . $this->environment;
}
    
public function getLogDir()
{
    if (in_array($this->environment, array('dev', 'test'))) {
        return '/run/shm/website/log';
    }

    if ( in_array($this->environment, array('prod'))) {
        return '/var/log/website';
    }

    // Sulu default
    return dirname($this->rootDir) . DIRECTORY_SEPARATOR
        . 'var' . DIRECTORY_SEPARATOR
        . 'logs' . DIRECTORY_SEPARATOR
        . $this->getContext();
}

We do this for all our symfony projects, and it's more or less standard practice.

Unfortunately, this breaks the console cache:clear command:

./bin/console cache:clear --env=dev
(...)

 // Clearing the admin cache for the dev environment with debug true                                                    

PHP Warning:  Uncaught Symfony\Component\Debug\Exception\ContextErrorException: Warning: require(/dev/shm/website/cache/dev/ContainerTd6tmmi/removed-ids.php): failed to open stream: No such file or directory in /dev/shm/website/cache/dev/ContainerTd6tmmi/adminDevDebugProjectContainer.php:1930
Stack trace:
#0 /dev/shm/website/cache/dev/ContainerTd6tmmi/adminDevDebugProjectContainer.php(1930): require()
#1 /vagrant/website/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php(184): ContainerTd6tmmi\adminDevDebugProjectContainer->getRemovedIds()
#2 /vagrant/website/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(667): Symfony\Component\DependencyInjection\Container->set('kernel', Object(AdminKernel))
#3 /vagrant/website/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(137): Symfony\Component\HttpKernel\Kernel->initializeContainer()
#4 /vagrant/website/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(154): Symfony\Compone in /dev/shm/website/cache/dev/ContainerTd6tmmi/adminDevDebugProjectContainer.php on line 1930
PHP Fatal error:  ContainerTd6tmmi\adminDevDebugProjectContainer::getRemovedIds(): Failed opening required '/dev/shm/website/cache/dev/ContainerTd6tmmi/removed-ids.php' (include_path='.:/usr/share/php') in /dev/shm/website/cache/dev/ContainerTd6tmmi/adminDevDebugProjectContainer.php on line 1930
10:36:33 CRITICAL  [php] Fatal Compile Error: ContainerTd6tmmi\adminDevDebugProjectContainer::getRemovedIds(): Failed opening required '/dev/shm/website/cache/dev/ContainerTd6tmmi/removed-ids.php' (include_path='.:/usr/share/php') ["exception" => Symfony\Component\Debug\Exception\FatalErrorException { …}] []

In adminDevDebugProjectContainer.php line 1930:
                                                                                                                                                                                                             
  Compile Error: ContainerTd6tmmi\adminDevDebugProjectContainer::getRemovedIds(): Failed opening required '/dev/shm/website/cache/dev/ContainerTd6tmmi/removed-ids.php' (include_path='.:/usr/shar  
  e/php')                                                                                                                                                                                                    
                                                                                                                                                                                                             

cache:clear [--no-warmup] [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>

This looks like a Symfony-internal issue, but I don't get this with any other Symfony installations, so I believe it is related to / caused by Sulu.

Interestingly, the issue only appears with the admin console - ./bin/websiteconsole cache:clear --env=dev seems to work fine (at least for now).

Just for the sake of it, I tried reverting the directory paths back to their original location, but then I run into this issue.

So - any hints on how to run Sulu on a vagrant box? 😃

Teaser missing data after clear indexes folder

Hello,

When we clear the content of var/indexes, we lost the data in the teaser content type. When it happens, we have to save those contents configured as a teaser, to rebuild the index data.
There is any way to rebuild its indexes, without having to go through all the content?

Thanks,

Route problems

Hello,
First of all, congratulations for the work done to get SULU. I am new and I need help. I can get SULU to work with the symfony server:run on my local server and it's great. However, in production I could not do it because I am on a shared server. So when I test with xamp I have route problems. for example :
GET http: //localhost/bundles/suluadmin/dist/login.min.1531913171267.css 404 (Not Found)
GET http: //localhost/bundles/suluadmin/css/main.css 404 (Not Found)
GET http: //localhost/bundles/suluadmin/js/vendor/husky/husky.min.js? V = 1531913171267 404 (Not Found)

I do not know how to solve this problem, I would like so much to put my site in production.

Thank you for your help.

no vendor folder after project install

composer create-project sulu/sulu-minimal myproj --no-interaction --prefer-source
composer create-project --prefer-dist sulu/sulu-minimal myproj
composer create-project sulu/sulu-minimal myproj

All tries of install finish same

Loading composer repositories with package information
Updating dependencies (including require-dev)

What updating? There is no vendor folder...

Accordingly, bin/adminconsole sulu:build dev tell me

PHP Warning:  require(/home/voodoo/www/myproj/app/../vendor/autoload.php): failed to open stream: No such file or directory in /home/voodoo/www/myproj/app/autoload.php on line 9

Default Snippets

Default Snippets don´t load if I want to call them with sulu_snippet_load_default('...').

Content tree nodes empty

Hello,

content tree nodes are not displayed anymore in admin side.
I can still create content nodes, but the tree is empty.

I check ajax call :

`http://www.mydomainname.com/admin/api/nodes/9b16b955-f26f-4abc-9c36-3858c6872d45?webspace=mydomainname&language=fr&fields=title,order,published&exclude-ghosts=false&exclude-shadows=false&&tree=true

{"_embedded":{"nodes":[]}}`

If I disable option tree, I got the node in data return

`http://www.mydomainname.com/admin/api/nodes/9b16b955-f26f-4abc-9c36-3858c6872d45?webspace=mydomainname&language=fr&fields=title,order,published&exclude-ghosts=false&exclude-shadows=false&&tree=false

{"id":"9b16b955-f26f-4abc-9c36-3858c6872d45","path":"/cmf/mydomainname/contents/fsdgfdg","hasChildren":false,"concreteLanguages":["fr"],"_links":{"children":{"href":"/admin/api/nodes?parent=9b16b955-f26f-4abc-9c36-3858c6872d45&language=fr&fields=title%2Corder%2Cpublished"}},"_embedded":{"nodes":[]},"title":"fsdgfdg","order":20,"published":"2016-09-29T12:16:15.000+02:00","publishedState":true,"_permissions":{"view":false,"add":false,"edit":false,"delete":false,"archive":false,"live":false,"security":false}}`

I think this is a bug and I don't know what to do.

I use minimal edition with theme bundle, sulu core 1.3.

Thanks

Thansks

Parse error: syntax error, unexpected ':', expecting ';'

I get this error on installing sulu minimal version with composer:

( ! ) Parse error: syntax error, unexpected ':', expecting ';' or '{' in C:\wamp64\www\project-name\vendor\ocramius\proxy-manager\src\ProxyManager\Configuration.php on line 97

Restructure routing files (like config)

The routing files should be structured like config in #2 this can be done when the the kernels are merged and in develop the same cache is used (because of profiler).

Routing seems to be messed up right out of the box

Q A
Bug? yes
New Feature? no
Sulu Version 1.6.24
Browser Version Chrome 72.0.3626.119

Actual Behavior

Upon creating new project, homepage routing seems to be messed up. It keeps redirecting to /en and failing to load the homepage completely. The preview in admin works though.

Expected Behavior

I would expect the example homepage to work right out of the box.

Steps to Reproduce

  1. Follow the setup steps.
  2. Visit sulu.localhost:10080

image

console sulu:translate:export

UPD: OK, I found the reason behind that strange behavior:
I run the console command from the bin directory, not from the root directory. So the script created the web/admin/translations inside the bin directory itself (I didn't notice that in time, my bad). Probably output should be prefixed by something like __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR (and checked for other scripts).

Original question:
I can't create my custom translation. I'm new to this, so probably I'm doing something wrong. This is how I acted;
I copy-pasted the backend.en.xlf from
/vendor/sulu/sulu/src/Sulu/Bundle/AdminBundle/Resources/translations/sulu
to
/app/Resources/translations/sulu
renamed it to backend.ru.xlf and changed inside the source-language property from "en" to "ru".
Next, I added to /app/Resources/config.yml the following lines:

sulu_core:
  ...
  locales:
    en: English
    ru: Russian
  translations:
    - en
    - ru

Next, I run the bin/console sulu:translate:export ru with the following output:

Exported 856 translations to web/admin/translations for locale ru

but despite to that saying there is no sulu.ru.json in /web/admin/translations and (of course) sulu admin stop working when I change it to "ru". So, what am I doing wrong?

P.S.
I'm sorry if this is the wrong place to ask such questions. If so, please point me to the right place to discuss them.

admin-bundle javascript hooks advice

Q A
Bug? no
New Feature? no
Sulu Version latest sulu-minimal
Browser Version Browser name and version

I am new to sulu and symfony.

I am interest in using this cms. But was wondering how to edit certain admin features.
Like i don't want the preview sidebar.

When looking at the cookbook.

layout: {
    extendExisting: false,
    navigation: {
        collapsed: false,
        hidden: false
    },
    content: {
        width: 'fixed',
        leftSpace: true,
        rightSpace: true,
        topSpace: true
    },
    sidebar: false
}

" just needs to be placed in the return block of the javascript-component and the AdminBundle does the rest"

Where do you place this? in the sulu-content.js file?
and how? I tried below but that isn't working.

`handleLayoutMarker = function(layout) {

return layout {
            navigation: {
                collapsed: false,
                hidden: false
            },
            content: {
                width: 'fixed',
                leftSpace: true,
                rightSpace: true,
                topSpace: true
            },
            sidebar: false
             };

`
Need some help to get started.Thanks in advance

Memory error when installing `sulu-minimal` via Composer

even after trying this trick

# php -dmemory_limit=-1 $HOME/bin/composer.phar create-project sulu/sulu-minimal . -n
Installing sulu/sulu-minimal (1.6.22)

  • Installing sulu/sulu-minimal (1.6.22): Loading from cache
    Created project in .
    Loading composer repositories with package information
    Updating dependencies (including require-dev)

mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory

Fatal error: Out of memory (allocated 779100160) (tried to allocate 75497472 bytes) in phar:///home/jodumont/bin/composer.phar/src/Composer/DependencyResolver/RuleSet.php on line 90

so what else I could try ?

Problems on running php bin/adminconsole sulu:build dev

Step 1: Running php bin/adminconsole sulu:build dev on a fresh sulu-minimal installation

Getting two errors:

[WARNING] Some commands could not be registered:
The command defined in "Sulu\Bundle\PreviewBundle\Command\CacheClearCommand" cannot have an empty name.

and

In adminDevDebugProjectContainer.php line 1940:
Compile Error: ContainerYswzosq\adminDevDebugProjectContainer::load(): Failed opening required ''/var/cache/admin/dev/ContainerYswzosq/getDoctrine_SchemaUpdateCommandService.php' (include_path='.:/usr/share/php')

Any ideas?

PSR-0 vs PSR-4

Just wondering if this edition can be updated to use PSR-4?

Separate xml templates for each workspace

Hi,

Is it possible to have different set of xml templates for each webspace?
Only those templates should be accessible in the webspace context. We would like to configure different xml templates, because we will have different layouts and website purposes.

Thanks,

add Docker container for dev environment

Goal:
Consistent development environments for entire Comunity. All developers use the same OS, same system libraries, same language runtime, no matter what host OS they are using (even Windows if you can believe it).

Rename app/Resources/views/templates

The naming of this directory is a little bit inconsistent: it contains templates for app/Resources/templates/pages

Is it possible to bring the naming closer to each other?

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.