Re: Ceon URI Mapping v4.x
I cast an eye over this thread but get dizzy with the details.
I would say that back in the day it was this mod that required me to use virtual hosts for local development work as detailed in my previous posts. No other method (alias) would work.
Long ago I updated this code for php7 and other bits, and to keep it alive posted it on Github.
I see someone has posted a "new" version in the plugins.
This I have not compared to mine so I cannot vouch for it.
I know mine works....so maybe you should compare it.
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
torvista
I cast an eye over this thread but get dizzy with the details.
I would say that back in the day it was this mod that required me to use virtual hosts for local development work as detailed in my previous posts. No other method (alias) would work.
Long ago I updated this code for php7 and other bits, and to keep it alive posted it on Github.
I see someone has posted a "new" version in the plugins.
This I have not compared to mine so I cannot vouch for it.
I know mine works....so maybe you should compare it.
Well I have four domain names on the verge of going live which have exactly the same installations on them. I gave them a look over and have realised one of those can actually go into a live status and it wouldn't take me too long to generate the URL's on that particular domain name, which wouldn't cause too many issues. So I am going to push it live, however if the problem remains I will take it offline again then will have a look at your version.
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
mc12345678
I neglected to also state that the specific error encountered in includes/functions/functions_general.php when trying whatever uri on the store was attempted is not directly associated with this plugin as it would have occurred regardless of being installed or not. The cause of getting a page not found error may have been a result of some aspect of its installation (possibly incomplete), incorrect use, or other some other factor, but there has not been sufficient information provided to identify why a page not found response was provided.
Generally speaking when using Zen Cart, it is expected that the uri to the store would be a "full" uri, not one using an ip address/temp folder. There are other threads in the forum where this is discussed and it is not necessarily associated with this plugin. I encourage seeking assistance with this aspect in either an existing thread directly related to the issue or by beginning a new one. Note that while this forum contains a lot of useful information that there are many Internet search tools outside of it that may find related discussions better than the forum's search tool. The recent recommendation of others is to add Zen Cart to the end of any such search.
I've now pushed one of the domain names live and still the problem of a blank installation check page exists. So obviously its nothing to do with the tilde.
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
Nick1973
I've now pushed one of the domain names live and still the problem of a blank installation check page exists. So obviously its nothing to do with the tilde.
So you're saying that the error generated is still:
Code:
[04-Sep-2018 16:53:54 UTC] Request URI: /~MYWEBSITEDIRECTORY/, IP address: 00.00.00.000
#1 preg_match() called at [/home/MYWEBSITEDIRECTORY/public_html/includes/functions/functions_general.php:1031]
#2 zen_back_link() called at [/home/MYWEBSITEDIRECTORY/public_html/includes/templates/template_default/templates/tpl_page_not_found_default.php:54]
#3 require(/home/MYWEBSITEDIRECTORY/public_html/includes/templates/template_default/templates/tpl_page_not_found_default.php) called at [/home/MYWEBSITEDIRECTORY/public_html/includes/templates/venturezen/common/tpl_main_page.php:179]
#4 require(/home/MYWEBSITEDIRECTORY/public_html/includes/templates/venturezen/common/tpl_main_page.php) called at [/home/vgd/public_html/index.php:97]
[04-Sep-2018 16:53:54 UTC] PHP Warning: preg_match(): Unknown modifier 'v' in /home/MYWEBSITEDIRECTORY/public_html/includes/functions/functions_general.php on line 1031
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
torvista
I cast an eye over this thread but get dizzy with the details.
I would say that back in the day it was this mod that required me to use virtual hosts for local development work as detailed in my previous posts. No other method (alias) would work.
Long ago I updated this code for php7 and other bits, and to keep it alive posted it on Github.
I see someone has posted a "new" version in the plugins.
This I have not compared to mine so I cannot vouch for it.
I know mine works....so maybe you should compare it.
I've managed to try your version and it works!
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
torvista
I cast an eye over this thread but get dizzy with the details.
I would say that back in the day it was this mod that required me to use virtual hosts for local development work as detailed in my previous posts. No other method (alias) would work.
Long ago I updated this code for php7 and other bits, and to keep it alive posted it on Github.
I see someone has posted a "new" version in the plugins.
This I have not compared to mine so I cannot vouch for it.
I know mine works....so maybe you should compare it.
I know I had compared the two which was where I found that changes had been made that prevented operation in php versions less than 7.x and also that the work done to use the ZC 1.5.5 notifier in zen_href_link and subsequently ensure the bread-crumbs had the rewritten uri were not adopted.
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
mc12345678
I know I had compared the two which was where I found that changes had been made that prevented operation in php versions less than 7.x and also that the work done to use the ZC 1.5.5 notifier in zen_href_link and subsequently ensure the bread-crumbs had the rewritten uri were not adopted.
I have a working version sort of which is the main thing. It looks like some modifications appear to be missing though from some files that aren't included unless they are in the installation instructions, so I am going to work through the list in a moment and come back to this thread.
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
torvista
I cast an eye over this thread but get dizzy with the details.
I would say that back in the day it was this mod that required me to use virtual hosts for local development work as detailed in my previous posts. No other method (alias) would work.
Long ago I updated this code for php7 and other bits, and to keep it alive posted it on Github.
I see someone has posted a "new" version in the plugins.
This I have not compared to mine so I cannot vouch for it.
I know mine works....so maybe you should compare it.
Is this important? Its in 1.5.5e/includes/templates/MYTEMPLATE/html_header.php
Code:
//steve bof CEON uri mapping
//CEON uri mapping produces a canonical link with no extra parameters: so no "?" after the url.
//To create the alternate urls for hreflang use, for all pages (apart from the home page), '&language=' is appended to the canonical url. This gets a page not found (in the Google Search Console) as the "&" needs to be a "?" as there are no other parameters.
//Since the $canonicalLink is already created, it needs to be checked for the presence of a "?". If so, ok, if not use the "?" instead of "&".
//echo '<link rel="alternate" href="' . ($this_is_home_page ? zen_href_link(FILENAME_DEFAULT, 'language=' . $key, $request_type) : $canonicalLink . '&language=' . $key) . '" hreflang="' . $key . '" />' . "\n";
echo '<link rel="alternate" href="' . ($this_is_home_page ? zen_href_link(FILENAME_DEFAULT, 'language=' . $key, $request_type) : $canonicalLink . (strpos($canonicalLink, '?') ? '&' : '?') . 'language=' . $key) . '" hreflang="' . $key . '" />' . "\n";//steve as per https://github.com/zencart/zencart/pull/1314/files
}
// EOF hreflang for multilingual sites
Just it breaks my site and I get a white page when I try to load the home page.
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
Nick1973
Is this important? Its in 1.5.5e/includes/templates/MYTEMPLATE/html_header.php
Code:
//steve bof CEON uri mapping
//CEON uri mapping produces a canonical link with no extra parameters: so no "?" after the url.
//To create the alternate urls for hreflang use, for all pages (apart from the home page), '&language=' is appended to the canonical url. This gets a page not found (in the Google Search Console) as the "&" needs to be a "?" as there are no other parameters.
//Since the $canonicalLink is already created, it needs to be checked for the presence of a "?". If so, ok, if not use the "?" instead of "&".
//echo '<link rel="alternate" href="' . ($this_is_home_page ? zen_href_link(FILENAME_DEFAULT, 'language=' . $key, $request_type) : $canonicalLink . '&language=' . $key) . '" hreflang="' . $key . '" />' . "\n";
echo '<link rel="alternate" href="' . ($this_is_home_page ? zen_href_link(FILENAME_DEFAULT, 'language=' . $key, $request_type) : $canonicalLink . (strpos($canonicalLink, '?') ? '&' : '?') . 'language=' . $key) . '" hreflang="' . $key . '" />' . "\n";//steve as per https://github.com/zencart/zencart/pull/1314/files
}
// EOF hreflang for multilingual sites
Just it breaks my site and I get a white page when I try to load the home page.
In what way does it break your site? Ie. what is in the error message?
It was determined to be important in some way which is why it was added.
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
Nick1973
I've now pushed one of the domain names live and still the problem of a blank installation check page exists. So obviously its nothing to do with the tilde.
The error message likely was the same as identified by wmorris where (at least) the file YOUR_ADMIN/includes/classes/class.CeonURIMappingInstallationCheck.php line 2173 uses the null coalesce operator of ?? (available first in PHP 7.0) in:
Code:
$path = $old_file_or_dir['file'] ?? $old_file_or_dir['dir'];
was used instead of the pre-PHP 7.0 release:
Code:
$path = isset($old_file_or_dir['file']) ? $old_file_or_dir['file'] : $old_file_or_dir['dir'];