[Bug] v4.8.7: Missing block helper functions cause HTTP 500 after upgrading from v4.8.6
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
Línea de trabajo
Compara app/Functions/functions.php en v4.8.6 y v4.8.7 y, después, lee sus puntos de llamada en resources/views/linkstack/elements/buttons.blade.php y app/Http/Controllers/LinkTypeViewController.php. Restaura o sustituye los seis helpers de bloque que faltan de forma coherente con esos puntos de llamada. Comprueba que, después de actualizar, funcionan tanto un perfil existente con bloques custom_html como la interfaz de edición de bloques.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- PHP
- Estrellas
- 3.9k
- Forks
- 440
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de LinkStackOrg/LinkStack
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
LinkStackOrg/LinkStack#1011 ·
-
Dificultad 3/5 Medio día Aptitud para principiantes 55/100
LinkStackOrg/LinkStack#1008 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
LinkStackOrg/LinkStack#1007 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 44/100
LinkStackOrg/LinkStack#1003 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 56/100
LinkStackOrg/LinkStack#1002 ·
Todos los issues de LinkStackOrg/LinkStack
Issues similares
-
needs-triage Technical TODO
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
question
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
PrivateBin/docker-nginx-fpm-alpine#264 · 1 comentario ·
-
Fix test suite isolation by cleaning up registered theme directories and cache in teardownPosiblemente ocupada @CookieDarb la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
WordPress/create-block-theme#895 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Piwigo/piwigo-docker#19 · 1 reacción ·
-
[Store][SurrealDb] add(), query() and remove() fail with 403 on a fresh store instancePosiblemente ocupada @lazerg la tomó hoy. AbiertoBug Status: Needs Review Store
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día