Shopware 6.7 plugin that adds a custom full-width bar to the top of the administration – with a freely chosen caption and up to nine buttons.
PlugwareAdminBar shopware/core: ~6.7.0)The Shopware administration offers no space for your own permanently visible notices or shortcuts. This plugin fills that gap: it puts a slim bar across the full width at the top, visible on every page of the administration.
Typical uses:
The bar is deliberately plain: no admin module of its own, no extra database table, no dependencies. Everything runs through the plugin configuration.
Extract the plugin directory to custom/plugins/PlugwareAdminBar, or upload
the ZIP in the administration under Extensions → My extensions. Then:
bin/console plugin:refresh
bin/console plugin:install --activate PlugwareAdminBar
bin/console assets:install
bin/console cache:clear
Afterwards reload the administration once with a hard refresh (Ctrl+F5) so the JavaScript is fetched.
bin/console plugin:refresh
bin/console plugin:update PlugwareAdminBar
bin/console assets:install
bin/console cache:clear
assets:install is needed on every update in which the JavaScript file changed –
otherwise the old state stays in the public/ directory.
Administration white after an update? Almost always the browser still holds
parts of the old admin bundle in its cache while newer files sit on the server.
A hard reload (Ctrl+F5, Cmd+Shift+R on macOS) fixes it. If that does not help, a
cache:clear on the server is usually missing.
If the page stays white and the browser console reports
service provider already instantiated followed by an error in
startBootProcess, the plugin can no longer be reached through the interface.
The way out via the console:
bin/console plugin:deactivate PlugwareAdminBar
bin/console cache:clear
The administration is reachable again afterwards. This doubles as the test of whether the plugin is the cause at all: if the page stays white with it deactivated, the problem lies elsewhere.
Then install the current version – it matters that the directory under
custom/plugins/ has actually been replaced before plugin:update runs:
bin/console plugin:refresh
bin/console plugin:update PlugwareAdminBar
bin/console plugin:activate PlugwareAdminBar
bin/console assets:install
bin/console cache:clear
To verify the new version took effect, check the administration's page source:
the plugware-admin-bar.js entry must carry the current version number in its
?v= parameter.
What was behind it: up to 1.1.19 the admin JavaScript called
Shopware.Service('loginService') twice a second as soon as that function
existed at all – that is, in the middle of Shopware's own boot process. Such an
access instantiates the service provider prematurely; Shopware then loses its
reference and aborts the start. A try/catch wrapper did not help, because the
error occurred in the core rather than in the plugin – the plugin merely
triggered it. As of 1.1.20, isBooted() checks before every service access that
#app is populated and that Shopware.Application.getApplicationRoot() returns
a root.
As a side effect the bar builds up slightly later, since it waits for the start to finish.
The plugin brings two automatic measures for this:
cache:clear is therefore ruled out as a cause.Beyond that it is built so that it cannot cause this state:
defer and a version parameter, so after an
update the browser is forced to fetch the new file.assets:install was forgotten, no
bar appears – with no consequences for anything else.bin/console plugin:deactivate PlugwareAdminBar
bin/console plugin:uninstall PlugwareAdminBar
bin/console cache:clear
The plugin creates no tables of its own. On uninstall, Shopware removes the
configuration values from system_config.
Settings → System → Plugins → Plugware Developer Admin Tool Bar → Configuration
The configuration is split into twelve cards: three for the bar itself and one per button.
| Field | Meaning | Default |
|---|---|---|
| Show bar | Turns the bar on and off without deactivating the plugin | on |
| Show caption | Shows or hides the text at the left of the bar | on |
| Caption | Single-line text at the left edge. Basic HTML is allowed, e.g. <a href="/">To the shop</a> or <strong>Staging</strong> |
Plugware |
| Show plugin icon | Shows the plugin's icon to the left of the caption | on |
| Size of the plugin icon in pixels | Edge length of the icon | 32 |
| Alignment | Left, centered or right. Applies to the buttons – the caption always stays left | centered |
| Field | Meaning | Default |
|---|---|---|
| Height in pixels | Height of the bar. The administration moves down accordingly | 48 |
| Background color | Color of the bar | #243758 |
| Text color | Color of the text. The button surfaces are derived from it as well | #ffffff |
| Font size in pixels | Font size of the caption | 16 |
| Field | Meaning | Default |
|---|---|---|
| Font size of the buttons in pixels | Applies to label and icon, 0 takes the bar's font size |
12 |
| Horizontal padding of the buttons in pixels | Space between the border and the content, left and right | 12 |
| Background color | Surface of the buttons | #3E4F6C |
| Text color | Text on the buttons | #FFFFFF |
| Border color | Border of the buttons | #616F87 |
| Background color on hover | Surface while the mouse is over it | #596780 |
| Text color on hover | Text while the mouse is over it | #FFFFFF |
| Border color on hover | Border while the mouse is over it | #8791A3 |
| Colour while a command runs | Spinner, dots, border and progress line during execution | #00FF00 |
| Height of the progress line in pixels | Thickness of the line at the bottom of the bar, 0 hides it |
5 |
| Long runtime after seconds | From this duration on the progress line changes colour, 0 disables it |
30 |
| Colour for long runtime | Colour of the line once that duration is exceeded | #FF0000 |
The six color fields come prefilled. The values match exactly what the earlier
automatic derivation produced on the default bar: semi-transparent white over
#243758, resolved into a fixed color.
Clear a field and it returns to that automatic behaviour, deriving the color from the bar's text color again. That is useful when you run a different background color for the bar – otherwise the buttons will not follow along.
The hover change is animated over 0.15 seconds and is skipped when "reduce motion" is enabled in the operating system.
| Field | Meaning |
|---|---|
| Icon | Symbol on the button, picked from a list. Defaults to "Refresh" |
| Console command | Command executed on click. Preset, see below |
A button only appears when a console command is selected. Its label comes from the command, the icon is optional.
After installation, all nine buttons are already assigned – the harmless ones first, the four marked ones behind them:
| Card | Command |
|---|---|
| Button 1 | cache:clear |
| Button 2 | cache:warmup |
| Button 3 | assets:install |
| Button 4 | plugin:refresh |
| Button 5 | ⚠ theme:compile |
| Button 6 | ⚠ dal:refresh:index |
| Button 7 | ⚠ sitemap:generate |
| Button 8 | ⚠ media:generate-thumbnails |
| Button 9 | ⚠ cache:clear:all |
The bar is therefore usable right away. For fewer buttons, set individual cards to "No command" – the button then disappears from the bar.
Every button triggers a maintenance command. Nine commands are available:
| Selection | Command |
|---|---|
| Clear cache | cache:clear |
| ⚠ Clear all caches | cache:clear:all |
| Warm up cache | cache:warmup |
| Install assets | assets:install |
| ⚠ Compile theme | theme:compile |
| Refresh plugin list | plugin:refresh |
| ⚠ Rebuild indexes | dal:refresh:index |
| ⚠ Generate sitemap | sitemap:generate |
| ⚠ Generate thumbnails | media:generate-thumbnails |
While the command runs, four things show it:
0 removes it entirely.The colour of these signals is set in the "Buttons: general" card; empty means the button's text colour is used. With "reduce motion" enabled in the operating system the animations are dropped, while the colour remains as a hint.
Afterwards a dialog shows the command's output and whether it succeeded.
The button carries the command's name – "Clear cache" or "Install assets", for instance, in the administration's language.
On security: the selection is deliberately a fixed list, not a free text
field. The administration only sends a key from that list to the API; the server
checks it against the same list again and runs something only then. Arguments or
options cannot be passed, and no shell is involved – the command runs through
the Symfony console application inside the running PHP process. Command
injection is therefore impossible, and it also works where proc_open is
disabled. The route sits in the API scope and is reachable only for logged-in
administrators.
On marking: five commands carry a ⚠ and appear in red in the select list.
They reach deeper or run long – an accidental click on dal:refresh:index can
tie up a large shop for minutes. The other four are harmless and safe to run at
any time.
cache:clear:all goes considerably further than cache:clear: it also empties
every cache pool and the HTTP cache and removes old system and Twig
directories. On a busy shop that means a noticeable load spike, since every page
has to be rebuilt. The command has been available since Shopware 6.6.8.
The colouring comes from the plugin's admin JavaScript: Shopware offers no way
to colour options of a select list through config.xml. Only entries starting
with the plugin's own warning sign are coloured, so other select lists in the
administration stay untouched. It uses the same colour as the long-runtime state
of the progress line.
On runtime: dal:refresh:index, theme:compile and
media:generate-thumbnails can take several minutes on large shops. The browser
waits for the response meanwhile; depending on server settings the request may
time out even though the command keeps running. For everyday use, cache:clear
and assets:install are the obvious candidates.
The bar reads its values through the admin API. After saving, it picks them up as soon as the browser window regains focus – for instance when you switch to another tab and back. To force it immediately, run this in the browser console:
plugwareAdminBar.reload();
To hide it temporarily without changing the configuration:
plugwareAdminBar.remove();
The bar consists of two areas:
┌──────────────────────────────────────────────────────────────┐
│ [Icon] Caption [Button] [Button] [Button] (i) │
└──────────────────────────────────────────────────────────────┘
em and scales along with it.The button surfaces are built semi-transparently from the text color as long as no colors of your own are set in the "Buttons: general" card, so they adapt automatically to a light or dark bar.
The info icon sits at the right edge and cannot be switched off, as it is the only way to reach this documentation. A click opens this documentation right inside the administration, switchable between German and English. Close it by clicking outside, via the cross, or with Escape.
The administration is pushed down via padding-top on <body>. If the main
navigation is fixed to the viewport, it is moved along as well.
The bar does not appear on the login screen – it is only built once a session exists, and is removed again as soon as that session ends.
PlugwareAdminBar/
├── composer.json metadata, version, Shopware requirement
├── README.md German version
├── README.en.md this file
├── build-readme-html.py generates the HTML versions for the info dialog
├── build-icons.py generates the icon catalogue from the Meteor Icon Kit
├── build-version.py writes the composer.json version into every file
└── src/
├── PlugwareAdminBar.php plugin class with the update() migration
├── Controller/
│ └── CommandController.php runs the allow-listed console commands
└── Resources/
├── config/
│ ├── config.xml all configuration fields, bilingual
│ ├── plugin.png icon of the plugin in "My extensions"
│ ├── services.xml service definition of the controller
│ └── routes.xml route of the API action
├── views/
│ └── administration/
│ └── index.html.twig includes the admin JS as a script tag
└── public/
└── administration/
├── js/
│ └── plugware-admin-bar.js builds the bar
├── img/
│ └── plugin.png icon shown in the bar
└── readme/
├── readme.de.html content of the info dialog
└── readme.en.html
The two HTML files in the readme/ folder are generated from this README and
the German one. They live under public/ because only that folder is shipped by
assets:install – the Markdown files in the plugin root are not reachable from
the browser.
Whenever a README changes, regenerate the HTML versions with the bundled script:
python3 build-readme-html.py
The script strips all links: the info dialog deliberately contains no clickable content, since links would either lead nowhere inside the administration or leave it unintentionally. The link text is kept.
Up to Shopware 6.6 the administration automatically loaded the file placed in
Resources/public/administration/js/ whose name matched the bundle name in
kebab case. That no longer holds since 6.7: the admin build moved from
Webpack to Vite. Shopware now asks /api/_info/config which plugin files to
load, and that answer is derived from the entrypoints.json generated by Vite
in Resources/public/administration/.vite/.
Without Node/npm that file does not exist, so hand-written JavaScript in
administration/js/ is simply never included.
The way around it without a build chain: override the admin template
index.html.twig and add the script tag yourself. The plugin uses the empty
Twig block administration_templates for this and sets nonce="{{ cspNonce }}"
so the administration's content security policy applies.
The path bundles/plugwareadminbar/... follows from the lowercased bundle
name – that is where assets:install copies src/Resources/public.
Shopware writes the defaults from config.xml into system_config only on
installation. If a default changes later, existing shops would keep the old
value.
The plugin class therefore contains an update() method that lifts a stored
value – but only if a previous default of this plugin is still in there. Values
you picked yourself are left alone. Background color, height and font size are
covered; the outdated values are constants at the top of the class and can be
extended there.
The version number lives in composer.json. From there a script writes it into
the Twig template, the admin JavaScript and both READMEs:
python3 build-version.py
This matters because the version has two technical effects: it is the cache parameter of the script URL and the value checked against a copy cached in the browser.
The icon catalogue in the admin JavaScript is generated from the official
package. To move it to a newer version or change the selection, adjust the
SELECTION list in build-icons.py and run:
npm pack @shopware-ag/meteor-icon-kit
tar xzf shopware-ag-meteor-icon-kit-*.tgz
python3 build-icons.py package/icons/regular
The script writes icons.generated.js; its content replaces the BUTTON_ICONS
block in plugware-admin-bar.js. The options in config.xml have to be
kept in sync manually.
The entire appearance is produced by a <style> block inside
plugware-admin-bar.js. If you want to change something fundamental – the
40% cap on the caption, say, or the z-index – every rule sits there in one
place. No build step is needed; assets:install and a hard reload are enough.
| Symptom | Cause and fix |
|---|---|
| Bar does not appear at all | Check in the network tab whether plugware-admin-bar.js is loaded. No request means the Twig override is not taking effect – run cache:clear. A 404 means assets:install is missing |
| Bar appears but stays empty | The caption is empty and no buttons are configured. That is the expected behaviour |
| A changed setting has no effect | Leave the window briefly and come back, or run plugwareAdminBar.reload() |
| New defaults do not arrive | A value of your own is already stored. Clear the field or set it by hand |
| Configuration shows in English | Should be fixed as of 1.0.8. If not, run cache:clear |
| Administration stays white, console reports "service provider already instantiated" | A script accesses Shopware.Service() too early. As of 1.1.20 the plugin waits for the boot process to finish |
| Info dialog stays empty | The file under administration/readme/ was not shipped – run assets:install |
| Command aborts with a timeout | The command takes too long for a web request – run it over SSH |
| Command reports "not allowed" | The selected key is not in the controller's allow list |
| Buttons run past the width of the bar | Too many or too long buttons – reduce the count or the font size |
| Something in the administration is misaligned | Adjust the CSS rules in the <style> block of the JavaScript file |
The changelog lists the substantive steps. Plain adjustments of default values – colours, sizes, presets – are not listed individually; the values in force are in the configuration tables above.
Shopware.Service() before the
administration had finished booting. Shopware aborted its own boot process and
the page stayed white. Every service access now waits for the start to completeonerror attribute from the script tag; the administration's
content security policy blocks inline event handlerscache:clear:all to the allow list and marked it as criticalPlugwareAdminBar, affecting the namespace, folder name,
asset path, API route and configuration keys. Shopware treats this as a new
plugin: an existing predecessor has to be uninstalled and stored settings are
not carried overCore functionality, built under an earlier technical name:
entrypoints.json after the move to Vite