shopware6-advanced-banners icon indicating copy to clipboard operation
shopware6-advanced-banners copied to clipboard

Missing backend route since 6.4.10

Open Patric96 opened this issue 2 years ago • 15 comments

Hey, i recently updated my shop to 6.4.10 and now the backend route is missing. The Plugin is correctly installed and the content is shown correctly in the frontend even though i can't edit it. Do you have an idea how to fix this?

Patric96 avatar Apr 07 '22 11:04 Patric96

@Patric96 Have you been able to temp. fix this issue by yourself?

OlliZabal avatar May 18 '22 10:05 OlliZabal

Hi @Patric96 @OlliZabal

This can be fixed by building the admin yourself: bin/build-administration.sh

This is a known change/bug in Shopware 6.4.10 and higher. Not all plugins that were built in an older version are working correctly, but building them yourself will fix it.

runelaenen avatar May 18 '22 10:05 runelaenen

@runelaenen Many thanks for your response and the info

OlliZabal avatar May 18 '22 10:05 OlliZabal

@runelaenen In a staging environment I did run the shopware core update from v6.4.9.0 to v6.4.11.1 and executed bin/build-administration.sh afterwards. But the link is still missing at the backend menu for the banners. I did then deactivate, deinstall the plugin keeping it's data and reinstall an activate it again = no change.

The crazy thing is, by calling php74 bin/build-administration.sh via console, I get displayed the content of the file.

Andy ideas?

OlliZabal avatar May 18 '22 13:05 OlliZabal

Hi @OlliZabal

Can you post the response content of the script that you see in your terminal when you run it? Maybe you are missing some dependencies like npm or jq.

It is normal this php74 xxxx doesn't return anything, because the build-script is a bash script, and not a PHP script.

runelaenen avatar May 18 '22 13:05 runelaenen

Hi @runelaenen

Can you post the response content of the script that you see in your terminal when you run it? Maybe you are missing some dependencies like npm or jq.

This is the output: `

CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"

set -euo pipefail

export PROJECT_ROOT="${PROJECT_ROOT:-"$(dirname "$CWD")"}" ADMIN_ROOT="${ADMIN_ROOT:-"${PROJECT_ROOT}/vendor/shopware/administration"}"

BIN_TOOL="${CWD}/console"

if [[ ${CI-""} ]]; then BIN_TOOL="${CWD}/ci" chmod +x "$BIN_TOOL" fi

build admin

[[ ${SHOPWARE_SKIP_BUNDLE_DUMP-""} ]] || "${BIN_TOOL}" bundle:dump

if [[ $(command -v jq) ]]; then OLDPWD=$(pwd) cd "$PROJECT_ROOT" || exit

jq -c '.[]' "var/plugins.json" | while read -r config; do
    srcPath=$(echo "$config" | jq -r '(.basePath + .administration.path)')

    # the package.json files are always one upper
    path=$(dirname "$srcPath")
    name=$(echo "$config" | jq -r '.technicalName' )

    if [[ -f "$path/package.json" && ! -d "$path/node_modules" && $name != "administration" ]]; then
        echo "=> Installing npm dependencies for ${name}"

        if [[ -f "$path/package-lock.json" ]]; then
            npm clean-install --prefix "$path"
        else
            npm install --prefix "$path"
        fi
    fi
done
cd "$OLDPWD" || exit

else echo "Cannot check extensions for required npm installations as jq is not installed" fi

(cd "${ADMIN_ROOT}"/Resources/app/administration && npm clean-install && npm run build) [[ ${SHOPWARE_SKIP_ASSET_COPY-""} ]] ||"${BIN_TOOL}" asset:install

`

Thank you

OlliZabal avatar May 18 '22 14:05 OlliZabal

Hi @OlliZabal

That are the correct scripts, so that's a start. But I meant the output the script gives when you run it 😄

runelaenen avatar May 18 '22 14:05 runelaenen

Hi @runelaenen

looks like this is not my day... stupid me (also me trying before to call a shell script via php...)! 😄😄😄

Sooo, when I try to call the script from shopware root dir via bin/build-administration.sh I get the following mesage: bash: bin/build-administration.sh: Permission denied

If I change to /bin and call then build-administration.sh I get the following message: bash: build-administration.sh: command not found

Hmmm... Just sent the hoster a mail asking for support why I get a "Permission denied" which I actually should not get.

OlliZabal avatar May 18 '22 14:05 OlliZabal

Hi @OlliZabal

You can run chmod +w bin/build-administration.sh to fix the permissions of the bin file ;)

runelaenen avatar May 18 '22 14:05 runelaenen

Hi @runelaenen

many thanks for helping out! 👍 🍺 The command chmod +w bin/build-administration.sh didn't brought any change.

OlliZabal avatar May 18 '22 15:05 OlliZabal

Ah, in that case it's something that only your hoster will/can know/fix. Good luck!

runelaenen avatar May 18 '22 15:05 runelaenen

Hi @runelaenen

just got response from the hoster - I needed to Chmod all sh files to 700. Now I ran in other issues, but thats not the point now - I'll give an update here as soon as I was able to tun bin/build-administration.sh and was able to get the menu link back.

Many thanks again @runelaenen 🍻 !

OlliZabal avatar May 18 '22 15:05 OlliZabal

Hi @runelaenen

I had to install node - and the shell script got executed with the following output: Cannot check extensions for required npm installations as jq is not installed

At that point, things get a bit more complicated as this system is not hosted on an own server (managed server).

I did noticed, that - as mentioned by you before that this is a known change/bug in Shopware 6.4.10 and higher - other used plugins also disappeared in the backend. I hope and will have to wait for a fix for that issue.

Thanks again for taking your time on this / for me 👍

OlliZabal avatar May 19 '22 08:05 OlliZabal

Hi @runelaenen As I won't be able to rebuild the admin myself on that server: -> is there a possibility that you might release an v6.4.10 compatible version?

OlliZabal avatar May 31 '22 09:05 OlliZabal

Hi @runelaenen , any news on that or will you not continue working on this great plugin?

OlliZabal avatar Aug 25 '22 10:08 OlliZabal