- the freshly attached card images did not show: text_only is the explicit no-image variant, so vitec:attach-card-images now flips a card to "vertical" whenever it carries (or receives) an image; and the new placeholder PNGs sat in the sshfs 770 trap - fix-asset-perms covers them, with public/product-audit added to its targets - new generic vitec:wrap-cards-grid --page=<slug>: wraps a page's cards into vitec_cols_33_33_33 containers (b13 columns 221/222/223), three per container, section-aware - every top-level intro paragraph starts a section, other element types close it, so the category headings on /products keep their grids beneath them. Existing grid containers are pooled and reused, surplus ones hidden - the first apply aborted mid-move and left a half state (15 empty shells, three cards moved; diagnosis migrations/check_grid_447.php, kept) - v2 repairs such states by design: global container pool, hard asserts after the create pass, try/catch around the move pass, and a final "no card left top-level" verification - applied on /products and verified live: 38 cards in 15 grids (sections 5/7/3/6/2/4/2/6/3 -> 2/3/1/2/1/2/1/2/1 containers), order intro -> grids -> banner -> faq intact, children delivered in the known items/contentElements shape Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
38 lines
1.7 KiB
Bash
Executable File
38 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
# =============================================================================
|
|
# VITEC — fix backend asset permissions after a deploy via the Windows sshfs mount
|
|
# -----------------------------------------------------------------------------
|
|
# sshfs-win (WinFsp) writes newly deployed files with mode 770 (no other-read).
|
|
# The webserver runs as "other" (suexec) -> assets under Resources/Public and
|
|
# public/_assets return HTTP 403 (backend icons / CSS / JS missing).
|
|
#
|
|
# chmod OVER the Windows mount does NOT change the real server mode, so this
|
|
# has to run ON THE SERVER, via real SSH, as the site owner (vitecevo).
|
|
#
|
|
# Usage (from the live/ project root on the server):
|
|
# bash fix-asset-perms.sh
|
|
# =============================================================================
|
|
set -u
|
|
cd "$(dirname "$0")" || exit 1
|
|
|
|
echo "[perms] Project root: $(pwd)"
|
|
# public/fileadmin as a whole, not just icons: every editorial upload and every
|
|
# importer output lands there (success_stories_import, blog-import, downloads,
|
|
# user_upload/products ...) and hits the same 403 otherwise. Found 2026-09-11,
|
|
# when the imported success-story images stayed invisible in the megamenu.
|
|
# public/product-audit: generated report page (build_product_audit.php), same 403 trap
|
|
TARGETS="public/_assets public/fileadmin public/product-audit packages/vitec/Resources/Public"
|
|
|
|
echo "[perms] Setting files 644 / directories 755 under $TARGETS ..."
|
|
find $TARGETS -type f -exec chmod 644 {} \; 2>/dev/null
|
|
find $TARGETS -type d -exec chmod 755 {} \; 2>/dev/null
|
|
|
|
echo "[perms] Flushing TYPO3 caches ..."
|
|
if [ -x vendor/bin/typo3 ]; then
|
|
vendor/bin/typo3 cache:flush
|
|
else
|
|
echo "[perms] (vendor/bin/typo3 not found — skip cache flush)"
|
|
fi
|
|
|
|
echo "[perms] Done."
|