Giter Club home page Giter Club logo

Comments (5)

alexander-nitsche avatar alexander-nitsche commented on June 9, 2024 1

I can reproduce the issue. With this bash script and ddev as prerequisite you can bring up an according Neos 7 instance with

PROJECT_FOLDER=<project-name> neos-7.sh

e.g.

PROJECT_FOLDER=my-website-2022 neos-7.sh

neos-7.sh:

#!/bin/bash

thisDir=$(realpath .)

#
# Install Neos 7 with sitepackage "Code Q Neos-Skeleton" in DDEV environment
#
# @see https://docs.neos.io/cms/installation-development-setup/all-platforms-using-ddev-and-docker
# @see https://github.com/code-q-web-factory/Neos-Skeleton/blob/master/docs/GETTING_STARTED.md
#
function installDdevDev()
{
  local projectFolder="${PROJECT_FOLDER}"
  local neosPackageName="${NEOS_PACKAGE_NAME}"
  local composerPackageName="${COMPOSER_PACKAGE_NAME}"

  [ -z "${projectFolder}" ] && projectFolder="."
  local projectDir=$(realpath "${projectFolder}")
  local projectFolderName=$(basename "${projectDir}")

  if [ -z "$neosPackageName" ]; then
    neosPackageName=$(convertToUpperCamelCase "${projectFolderName}")
    neosPackageName="${neosPackageName}.Site"
  fi

  if [ -z "$composerPackageName" ]; then
    composerPackageName=$(convertToLowerCaseWithoutDashes "${projectFolderName}")
    composerPackageName="${composerPackageName}\/site"
  fi

  if isDirectoryWithFiles "${projectFolder}"; then
    echo "Folder \"${projectFolder}\" already exists and is not empty. Choose a different folder by the environment variable PROJECT_FOLDER. Aborting Neos installation."
    exit
  fi

  git clone [email protected]:code-q-web-factory/Neos-Skeleton.git ${projectFolder}
  cd ${projectDir}
  mv DistributionPackages/CodeQ.Site DistributionPackages/${neosPackageName}
  find . -type f -name 'composer.json' | xargs sed -i "s/codeq\/site/${composerPackageName}/g"
  find ./DistributionPackages/${neosPackageName} -type f | xargs sed -i "s/CodeQ\.Site/${neosPackageName}/g"
  rm -Rf docs
  rm -rf .git && git init
  ddev config \
    --project-type="php" \
    --docroot="Web" \
    --create-docroot \
    --database="mariadb:10.5" \
    --php-version="7.4" \
    --timezone="Europe/Berlin" \
    --web-environment-add="FLOW_CONTEXT=Development/Local"
  ddev composer install
  git add .
  git commit -m "TASK: Initialize Neos 7 project with Code Q Neos-Skeleton"

  mkdir -p Configuration/Development/Local
  tee Configuration/Development/Local/Settings.yaml > /dev/null << EOT
Neos:
  Imagine:
    driver: Imagick
  Flow:
    persistence:
      backendOptions:
        driver: pdo_mysql
        dbname: db
        user: db
        password: db
        host: db
    http:
      trustedProxies:
        proxies: "*"
EOT

  ddev launch

  cat << EOT
Fetch installation password with
---
cd ${projectDir} && ddev exec cat /var/www/html/Data/SetupPassword.txt && cd -
---
EOT

  cd "${thisDir}"
}

function convertToUpperCamelCase()
{
  local input="$1"
  input=$(echo "$input" | sed -r 's/^(.)|-(.)/\U\1\U\2/g')
  echo "$input"
}

function convertToLowerCaseWithoutDashes()
{
  local input="$1"
  input=$(echo "$input" | sed -r 's/-//g')
  input=${input,,}
  echo "$input"
}

function isDirectoryWithFiles()
{
  local directory="$1"
  if [ ! -d "$directory" ] || find "$directory" -maxdepth 0 -empty | grep -q "."; then
    return 1
  else
    return 0
  fi
}

installDdevDev

from neos-ui.

rolandschuetz avatar rolandschuetz commented on June 9, 2024

The problem is fixed by Felix from Code Q with this PR:
https://github.com/code-q-web-factory/Neos-Skeleton/pull/30/files

Can you please check, that is also fixed in your project with this code change.

from neos-ui.

alexander-nitsche avatar alexander-nitsche commented on June 9, 2024

I can confirm that this commit fixes the problem in Neos 7 LTS.

It would be interesting to get some background information on this problem, which could be interesting for any Neos developer, but especially for beginners.

from neos-ui.

alexander-nitsche avatar alexander-nitsche commented on June 9, 2024

While analyzing the Neos / Flow cache, I noticed that with PR #30, the footer is cached twice: (1) The footer of the homepage (which is editable) and (2) the footer of every other page (which is not editable).

from neos-ui.

Sebobo avatar Sebobo commented on June 9, 2024

I would close this now as the issues are not in this repo.

from neos-ui.

Related Issues (20)

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.