Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.

Missing backend route since 6.4.10 #33

Open
Patric96 opened this issue Apr 7, 2022 · 15 comments
Open

Missing backend route since 6.4.10 #33

Patric96 opened this issue Apr 7, 2022 · 15 comments

Comments

@Patric96
Copy link

Patric96 commented Apr 7, 2022

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?

@OlliZabal
Copy link
Contributor

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

@runelaenen
Copy link
Owner

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.

@OlliZabal
Copy link
Contributor

@runelaenen Many thanks for your response and the info

@OlliZabal
Copy link
Contributor

@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?

@runelaenen
Copy link
Owner

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.

@OlliZabal
Copy link
Contributor

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

@runelaenen
Copy link
Owner

Hi @OlliZabal

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

@OlliZabal
Copy link
Contributor

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.

@runelaenen
Copy link
Owner

Hi @OlliZabal

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

@OlliZabal
Copy link
Contributor

OlliZabal commented May 18, 2022

Hi @runelaenen

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

@runelaenen
Copy link
Owner

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

@OlliZabal
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants