[Bug] v4.8.7: Missing block helper functions cause HTTP 500 after upgrading from v4.8.6
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 72/100
Rechercherichtung
Vergleiche app/Functions/functions.php in v4.8.6 und v4.8.7 und lies anschließend die Aufrufer in resources/views/linkstack/elements/buttons.blade.php und app/Http/Controllers/LinkTypeViewController.php. Stelle die sechs fehlenden Block-Hilfsfunktionen wieder her oder ersetze sie und stimme sie einheitlich auf diese Aufrufer ab. Überprüfe nach dem Upgrade, ob ein bestehendes Profil mit custom_html-Blöcken und die Oberfläche zur Bearbeitung von Blöcken beide funktionieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
LinkStack version
4.8.7
Description
After upgrading from v4.8.6 to v4.8.7 using the built-in updater, my existing LinkStack instance returns HTTP 500. The updater reached its success page, but the public profile no longer loads.
The Laravel log reports:
Call to undefined function setBlockAssetContext()
at /htdocs/storage/framework/views/b7d603e7af4f1b916ac46071eaaeeb199ff25572.php:14
Findings
The official release archive was downloaded and inspected:
https://github.com/LinkStackOrg/LinkStack/releases/download/v4.8.7/linkstack.zip
It contains calls to setBlockAssetContext() in:
resources/views/linkstack/elements/buttons.blade.php, line 14app/Http/Controllers/LinkTypeViewController.php, line 51
However, no definition of this function was found in the PHP files in the archive.
Compared with the v4.8.6 source, the following block helpers are missing from app/Functions/functions.php in v4.8.7:
setBlockAssetContextblock_assetget_block_file_contentsblock_text_translation_checkblock_textbt
The v4.8.7 edit-link view also still calls block_text_translation_check() and bt().
Steps to reproduce
- Start with an existing v4.8.6 installation whose profile contains blocks rendered through the
custom_htmlbranch ofbuttons.blade.php. - Upgrade to v4.8.7 using the built-in updater.
- Open the public profile.
- Observe HTTP 500 and the undefined-function exception.
Troubleshooting performed
- Confirmed that the container is using the intended bind-mounted application directory.
- Successfully ran
php artisan view:clear. - Retested directly inside the container, bypassing Traefik:
curl -sS --max-time 10 -o /dev/null -w 'HTTP %{http_code}\n' http://localhost
Result: HTTP 500. The same undefined-function exception persists.
The failing HTTP response causes the Docker healthcheck to mark the container unhealthy. The instance then disappears from Traefik's routing configuration, resulting in an external 404.
Expected behavior
Existing profiles and block editing should continue working after the update, with all required helper functions available.
I am rolling back to v4.8.6 from backup to restore service. Could you please check whether these helpers were accidentally omitted from v4.8.7?
Details about your system
- Deployment: Docker Compose on a Linux host
- Image: linkstackorg/linkstack:latest
- LinkStack upgrade: v4.8.6 → v4.8.7 via the built-in updater
- PHP: 8.3.29
- Apache: 2.4.66
- Reverse proxy: Traefik 3.7.10
- Persistent storage: host directory bind-mounted to /htdocs
- Docker healthcheck: curl -fsS --max-time 5 http://localhost/ -A 'HealthCheck' >/dev/null || exit 1
- Healthcheck result after upgrade: HTTP 500 / unhealthy
How to reproduce
- Start with a working v4.8.6 installation containing blocks rendered through the
custom_htmlbranch ofresources/views/linkstack/elements/buttons.blade.php. - Upgrade to v4.8.7 using the built-in updater.
- Open the public profile.
- The request returns HTTP 500, and the Laravel log reports:
Call to undefined function setBlockAssetContext(). - Run
php artisan view:clearand reload. The same error persists.
The error also occurs when requesting http://localhost/ directly inside the container, bypassing the reverse proxy.
Inspecting the official v4.8.7 release ZIP shows calls to setBlockAssetContext() in the controller and Blade template, but no corresponding function definition in the included PHP files.
Possible Solution
Please review the changes to app/Functions/functions.php between v4.8.6 and v4.8.7 and restore or replace the missing block helpers consistently with their callers:
- setBlockAssetContext
- block_asset
- get_block_file_contents
- block_text_translation_check
- block_text
- bt
The public profile still calls setBlockAssetContext(), while the edit-link view still calls block_text_translation_check() and bt().
A corrected release should be tested against both an existing profile containing blocks and the block editing interface. Clearing the compiled views alone does not resolve the issue.
This is a proposed fix based on the source comparison; I have not applied or verified a patch.
Additional Context
Inspected release archive:
https://github.com/LinkStackOrg/LinkStack/releases/download/v4.8.7/linkstack.zip
SHA-256 of the inspected archive:
880b144372b0c7adf253a921c7c124de799505396c7a814ec76e6290a9d02108
The container's bind mount was verified against the host directory using inode numbers, ruling out an accidentally mounted alternative directory at the time of testing.
The internal HTTP 500 causes the Docker healthcheck to fail. The container becomes unhealthy and disappears from Traefik's routing configuration, producing an external 404. The PHP exception is therefore the primary finding.
I am rolling back to v4.8.6 from backup while awaiting a corrected release.
- Vorherrschende Sprache
- PHP
- Sterne
- 3.9k
- Forks
- 440
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus LinkStackOrg/LinkStack
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 20/100
LinkStackOrg/LinkStack#1011 ·
-
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 55/100
LinkStackOrg/LinkStack#1008 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 62/100
LinkStackOrg/LinkStack#1007 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 44/100
LinkStackOrg/LinkStack#1003 · 1 Kommentar ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 56/100
LinkStackOrg/LinkStack#1002 ·
Alle Issues in LinkStackOrg/LinkStack
Ähnliche Issues
-
needs-triage Technical TODO
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 2 Tagen
-
question
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
PrivateBin/docker-nginx-fpm-alpine#264 · 1 Kommentar ·
-
Fix test suite isolation by cleaning up registered theme directories and cache in teardownEvtl. vergeben @CookieDarb hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
WordPress/create-block-theme#895 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
Piwigo/piwigo-docker#19 · 1 Reaktion ·
-
[Store][SurrealDb] add(), query() and remove() fail with 403 on a fresh store instanceEvtl. vergeben @lazerg hat das heute übernommen. OffenBug Status: Needs Review Store
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag