Skip to content

Instantly share code, notes, and snippets.

View jasperf's full-sized avatar
🏠
Working from home

Jasper Frumau jasperf

🏠
Working from home
View GitHub Profile
@jasperf
jasperf / new-178-branch-setup.sh
Last active August 23, 2025 01:52
PrestaShop 1.7.6.5 to 1.7.8.11 using the Git approach before loading in Development on Prestashop Platform
cd ~/code/site/
git status
git pull origin master
git log --oneline -10
git checkout -b prestashop-1.7.8-upgrade
wget https://github.com/PrestaShop/PrestaShop/releases/download/1.7.8.11/prestashop_1.7.8.11.zip
unzip prestashop_1.7.8.11.zip
unzip prestashop.zip -d prestashop_1.7.8.11/
mkdir prestashop_1.7.8.11
unzip prestashop.zip -d prestashop_1.7.8.11/
On branch prestashop-1.7.8-upgrade
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: app/AppCache.php
modified: app/AppKernel.php
modified: app/Resources/all_languages.json
modified: app/Resources/geoip/index.php
modified: app/Resources/legacy-to-standard-locales.json
modified: app/Resources/translations/default/AdminActions.xlf
app/AppCache.php | 15 +-
app/AppKernel.php | 100 +-
app/Resources/all_languages.json | 50 +-
app/Resources/geoip/index.php | 12 +-
app/Resources/legacy-to-standard-locales.json | 3 +
.../translations/default/AdminActions.xlf | 663 +-
.../default/AdminAdvparametersFeature.xlf | 1340 +--
.../default/AdminAdvparametersHelp.xlf | 489 +-
.../default/AdminAdvparametersNotification.xlf | 382 +-
.../translations/default/AdminCatalogFeature.xlf | 1469 ++--

PrestaShop 1.7.6.5 to 1.7.8.11 Upgrade Plan

Overview

This upgrade plan addresses backup issues caused by over 1 million entries in the ps_guest table. The manual upgrade approach using Git provides better control and avoids the problematic auto-upgrade process.

Environment Setup

  • Git Repository: ssh://git@git.hyperlane.co/site/site.git
  • Current Version: PrestaShop 1.7.6.5
  • Target Version: PrestaShop 1.7.8.11
  • Admin Directory: /kanri/ (custom renamed from /admin/)
@jasperf
jasperf / presta176-upgrade.sh
Last active August 16, 2025 00:58
Prestashop 1.7.6 upgrade
# Where the Backup Setting Actually Lives
# In v6.x, autoupgrade doesn’t read a config.json — instead it stores its settings in:
cd /root/build/modules/autoupgrade/config/
# specifically in a file like:
# config.inc.php
#Inside you’ll see constants such as:
define('PS_AUTOUP_BACKUP', '1');
define('PS_AUTOUP_KEEP_IMAGES', '1');
# Two Ways to Really Bypass Backup in Your Setup
Option 1 — Patch BackupDb.php (cleanest)
@jasperf
jasperf / trx_addons-plugin-errrors.sh
Last active June 3, 2025 04:19
trx_adddons by Theme Rex https://themerex.net/ errors
domainnet@tb-xxxx-linssh059:/data/sites/web/domainnet/subsites/staging.domain.net# wp search-replace 'https://www.domain.net' 'https://staging.domain.net' --skip-columns=guid --dry-run
PHP Warning: Constant ABSPATH already defined in phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1334) : eval()'d code on line 66
Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>instagram-feed</code> domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /data/sites/web/domainnet/subsites/staging.domain.net/wp-includes/functions.php on line 6114
Warning: Undefined array key "widgets_args" in /data/sites/web/domainnet/
@jasperf
jasperf / test-banner-functionality.html
Created May 26, 2025 01:58
Banner Container Plugin content_wrap test file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Banner Container Test</title>
<style>
body { font-family: Arial, sans-serif; margin: 20px; }
.content_wrap {
border: 2px solid #333;
@jasperf
jasperf / 1setup.php
Last active May 1, 2025 03:51
Register Patterns in Sage 11 theme as loading from patterns directory by default does not work
<?php
/**
* Register custom block pattern categories and patterns.
*/
add_action('init', function () {
// First register the block type
register_block_type('nynaeve/website-packages', [
'render_callback' => function ($attributes, $content) {
return $content; // Simply return the content as is
},
@jasperf
jasperf / rsync.sh
Last active April 23, 2025 03:37
Rsync Theme from Trellis setup to Theme repository
#!/bin/bash
rsync -av --delete \
--exclude 'node_modules/' \
--exclude 'vendor/' \
--exclude '.git/' \
--exclude '.github/' \
--exclude '.DS_Store' \
~/code/site.com/site/web/app/themes/theme-name/ \
~/code/site/
@jasperf
jasperf / setup-package.sh
Last active April 18, 2025 05:28
Acorn Package Renaming Script
#!/bin/bash
# --- Configuration ---
DRY_RUN=false
# --- Helper Functions ---
# Helper function for cross-platform sed
safe_sed() {
local pattern="$1"
local replacement="$2"