raiwa wrote: ↑Mon May 22, 2023 10:43 am
Just found that the above fix breaks the code on the public store side.
What works for me on both sides, is the following:
HP Notice: Undefined variable: Linker in /home/XXXX/public_html/test/includes/system/override/name_based_urls.php on line 103
[22-May-2023 14:54:43 Europe/Helsinki] PHP Fatal error: Uncaught Error: Call to a member function get_prefix() on null in /home/XXXX/public_html/test/includes/system/override/name_based_urls.php:103
Stack trace:
#0 /home/XXXX/public_html/test/includes/system/override/name_based_urls.php(128): name_based_urls->__construct()
#1 /home/XXXX/public_html/test/includes/system/versioned/1.0.8.1/hooks.php(166): name_based_urls::listen_hrefLink(Array)
#2 /home/XXXX/public_html/test/includes/system/versioned/1.0.8.5/href.php(137): hooks->chain('hrefLink', Array)
#3 /home/XXXX/public_html/test/includes/system/versioned/1.0.8.5/href.php(142): Href->link()
#4 /home/XXXX/public_html/test/includes/modules/boxes/bm_languages.php(36): Href->__toString()
#5 /home/XXXX/public_html/test/includes/system/versioned/1.0.8.4/template.php(79): bm_languages->execute()
#6 /home/XXXX/public_html/test/templates/default/in in /home/XXXX/public_html/test/includes/system/override/name_based_urls.php on line 103
PHP Notice: Undefined variable: Linker in /home/XXXX/public_html/test/includes/system/override/name_based_urls.php on line 103
PHP Fatal error: Uncaught Error: Call to a member function get_prefix() on null in /home/XXXX/public_html/test/includes/system/override/name_based_urls.php:103
Stack trace:
#0 /home/XXXX/public_html/test/includes/system/override/name_based_urls.php(128): name_based_urls->__construct()
#1 /home/XXXX/public_html/test/includes/system/versioned/1.0.8.1/hooks.php(166): name_based_urls::listen_hrefLink(Array)
#2 /home/XXXX/public_html/test/includes/system/versioned/1.0.8.5/href.php(137): hooks->chain('hrefLink', Array)
#3 /home/XXXX/public_html/test/includes/system/versioned/1.0.8.5/href.php(142): Href->link()
#4 /home/XXXX/public_html/test/includes/modules/header_tags/ht_canonical.php(50): Href->__toString()
#5 /home/XXXX/public_html/test/includes/system/versioned/1.0.8.4/template.php(79): ht_canonical->execute()
#6 /home/XXXX/public_html/test/templates/defa in /home/XXXX/public_html/test/includes/system/override/name_based_urls.php on line 103
ecartz wrote: ↑Sun May 21, 2023 11:13 pm
You could also hunt down whatever is creating the link and move it lower in the code so it gets called later. That might mean moving it out of a constructor.
@ecartz , @Omar_one
O.K. I tested it now for all cases:
- Admin side if a link is placed in a module/class constructor
- Shop side
- XML sitemap generator
raiwa wrote: ↑Tue May 23, 2023 6:50 am
@ecartz , @Omar_one
O.K. I tested it now for all cases:
- Admin side if a link is placed in a module/class constructor
- Shop side
- XML sitemap generator