[Bug] v4.8.7: Missing block helper functions cause HTTP 500 after upgrading from v4.8.6
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 72/100
Piste de recherche
Comparez app/Functions/functions.php dans les versions v4.8.6 et v4.8.7, puis lisez ses appelants dans resources/views/linkstack/elements/buttons.blade.php et app/Http/Controllers/LinkTypeViewController.php. Restaurez ou remplacez les six helpers de bloc manquants de manière cohérente avec ces appelants. Vérifiez qu’après la mise à niveau, un profil existant avec des blocs custom_html et l’interface de modification des blocs fonctionnent tous les deux.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- PHP
- Étoiles
- 3.9k
- Forks
- 440
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de LinkStackOrg/LinkStack
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 20/100
LinkStackOrg/LinkStack#1011 ·
-
Difficulté 3/5 Une demi-journée Accessibilité débutants 55/100
LinkStackOrg/LinkStack#1008 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 62/100
LinkStackOrg/LinkStack#1007 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 44/100
LinkStackOrg/LinkStack#1003 · 1 commentaire ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 56/100
LinkStackOrg/LinkStack#1002 ·
Toutes les issues de LinkStackOrg/LinkStack
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
Les mainteneurs répondent en général sous 1 jour
-
PHP SDK drops the API path prefix when a custom base URL has no trailing slashPeut-être pris @Winoren l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
langgenius/dify#44568 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
1. to develop bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: Copilot displays warning when both claude and copilot harnesses installed in same repoOuvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
awslabs/aidlc-workflows#2921 ·
Les mainteneurs répondent en général sous 1 jour
-
Bug Status: Needs Triage
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
php/php-src#24552 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour