Mike Rockett Posted September 23, 2018 Author Share Posted September 23, 2018 @rareyush My apologies for the late response here. Haven't had a chance to look into it yet. What is the domain of the new site? Is it live at the moment? Thinking I'd need to take a look and see what happens - if you could provide some more info. Thanks! Link to comment Share on other sites More sharing options...
Mike Rockett Posted September 23, 2018 Author Share Posted September 23, 2018 @panx Thanks for the report – please could you have a look in your server logs to see what the error is? Link to comment Share on other sites More sharing options...
Mike Rockett Posted September 24, 2018 Author Share Posted September 24, 2018 I've released 1.5.50, now hosted over at GitLab: https://gitlab.com/rockettpw/seo/jumplinks-one This release fixes an issue where calls to sitemap.xml from my sitemap module were being logged as 404s. 1 Link to comment Share on other sites More sharing options...
panx Posted September 26, 2018 Share Posted September 26, 2018 On 9/23/2018 at 8:26 AM, Mike Rockett said: @panx Thanks for the report – please could you have a look in your server logs to see what the error is? @Mike Rockett [Wed Sep 26 11:27:17.253274 2018] [core:alert] [pid 13619] [client **] /home/httpd/vhosts/**/.htaccess: Invalid command 'RewriteCond\xef\xbb\xbf', perhaps misspelled or defined by a module not included in the server configuration, referer: https://**/pw/setup/jumplinks/ I don't get this properly done - lack of knowledge of .htaccess coding. Please don't ask me for the current htaccess code, it's rubbish. How can I rewrite the original URL to the deseried URL? Original URL: /index.php?reference=kunststoff&object=1 /index.php?article-group=a&article-number=101.030 Desired destination URL:/reference/kunststoff/object/1 /article-group/a/article-number/101.030 With this desired destination URL, i will be able to pass through jumplinks to reach the final URL. Link to comment Share on other sites More sharing options...
Mike Rockett Posted September 26, 2018 Author Share Posted September 26, 2018 @panx - looks like there might be an encoding issue with the RewriteCond directive there... Not sure how it would have happened, but my best guess would be to type the directives in manually. Also, the second RewriteCond line in that state won't apply to you. You'd likely need a catch-all of sorts to match the different types. I'm not able to test this as I no longer use Apache, but this could work: RewriteCond %{REQUEST_URI} ^\/index\.php [NC] RewriteCond %{QUERY_STRING} ^(.+)$ [NC] RewriteRule ^ /index_php/%1? [R,L] From there, you'd be able to create a jumplink for index_php/reference={reference:segment}&object={object:num}, which could then be directed to reference/{reference}/object/{object}. 1 Link to comment Share on other sites More sharing options...
panx Posted September 27, 2018 Share Posted September 27, 2018 @Mike Rockett thank you for your help! With the following modification, I was able to do the jumplink stuff. RewriteCond %{REQUEST_URI} ^\/index\.php [NC] RewriteCond %{QUERY_STRING} ^(.+)$ [NC] RewriteRule ^ /index2.php?%1? [R,L] 1 Link to comment Share on other sites More sharing options...
gr00__ Posted October 22, 2018 Share Posted October 22, 2018 I am experiencing problems when the source URL contains '('. So, it works when I use 'something.html' as source, but when using 'something-(other).html' I get this error: Not Found The requested URL /something-(other).html was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.4.34 (Win32) OpenSSL/1.0.2o PHP/5.6.37 Server at es-local Port 80 I have a couple of old links that use '(' and would rather not mess with .htaccess. I have checked "Turn debug mode on" but nothing changes Appreciate your help... Link to comment Share on other sites More sharing options...
gr00__ Posted October 24, 2018 Share Posted October 24, 2018 Also, how would you strip a ',' from the link? PW doesn't seem to allow those, but I have them in previous links... Link to comment Share on other sites More sharing options...
DarsVaeda Posted October 25, 2018 Share Posted October 25, 2018 @Mike Rockett // Get the correct table name for ProcessRedirects $redirectsTableNameQuery = $this->database->prepare('SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = :db_name AND TABLE_NAME LIKE :table_name'); $redirectsTableNameQuery->execute(array( 'db_name' => $this->config->dbName, 'table_name' => $this->redirectsTableName, )); if ($redirectsTableNameQuery->rowCount() > 0) { $redirectsTableNameResult = $redirectsTableNameQuery->fetch(PDO::FETCH_OBJ)->TABLE_NAME; if ($this->redirectsTableName == $redirectsTableNameResult || strtolower($this->redirectsTableName) == $redirectsTableNameResult) { $this->redirectsTableName = $redirectsTableNameResult; } } Mike, why are you doing this? And why are you doing this in the constructor? As far as I can see it is just used in the "___executeImport" function. Which I suspect is called only once when doing whatever kind of import that is. I don't even have that table in my database. Yet as the code is placed in the constructor every time a page is called there is this request to information_schema. This leads to a high database load due to a lot of permission requests. I suspect you can move that to the import function? Link to comment Share on other sites More sharing options...
Mike Rockett Posted October 27, 2018 Author Share Posted October 27, 2018 @DarsVaeda – Thanks for bringing that up. I did indeed plan to move it some time back, but then decided to only do it for v2, which, hasn't been under active development of late. I'll try find some time to sort this out on v1 soon. Sorry for the issues caused here. ? @gr00__ (sorry, not sure why it's not tagging you) – That would likely be due to PW’s htaccess rules, as the error is coming from Apache. As that's where its coming from, you'd need to create a rule that will strip out those characters. Haven't worked with htaccess for a long time now, so not confident that I can assist accurately… Link to comment Share on other sites More sharing options...
DarsVaeda Posted October 29, 2018 Share Posted October 29, 2018 On 10/27/2018 at 6:46 PM, Mike Rockett said: @DarsVaeda – Thanks for bringing that up. I did indeed plan to move it some time back, but then decided to only do it for v2, which, hasn't been under active development of late. I'll try find some time to sort this out on v1 soon. Sorry for the issues caused here. ? I've just moved it down to the function without anything popping up in error log. Load is down by 90% at least, site speed has improved dramatically as well. I'd suggest you really look into this asap ? 2 Link to comment Share on other sites More sharing options...
cb2004 Posted December 3, 2018 Share Posted December 3, 2018 Can the module redirect to destination including query strings or anything after the / for example? I have tried numerous things but no joy. Having to do this in .htaccess: RewriteRule ^old-page/(.*) /new-folder/new-page/$1 [L,R] Cheers. Link to comment Share on other sites More sharing options...
Mike Rockett Posted December 8, 2018 Author Share Posted December 8, 2018 @cb2004 – https://jumplinks.rockett.pw/features/smart-wildcards.html – you'll probably want to use {segments} or {all} here. ? 1 Link to comment Share on other sites More sharing options...
cb2004 Posted December 10, 2018 Share Posted December 10, 2018 On 12/8/2018 at 10:04 AM, Mike Rockett said: @cb2004 – https://jumplinks.rockett.pw/features/smart-wildcards.html – you'll probably want to use {segments} or {all} here. ? That done the trick, I had to turn off cleaning for things like ?utm_source=X&utm_source=Y. What caught me out here was page:1000{all} didn't work, fine once I realised though. Link to comment Share on other sites More sharing options...
Karinne Cyphers Posted January 3, 2019 Share Posted January 3, 2019 We've had some issues redirecting urls that include a tilde (~/media/) in it. We are moving over a site that makes heavy use of urls like that from the previous version. Is this something we can handle with jumplinks or do we need to try to do that in the .htaccess? We can get the URL to show in the list, but Jumplinks will never register a hit against it. Do you have a recommendation on how to handle urls like this? Thank you! Link to comment Share on other sites More sharing options...
Peter Knight Posted January 4, 2019 Share Posted January 4, 2019 Hi Mike When creating a jumplink, there's a link to your site for examples. Currently generating a 404 error Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 6, 2019 Author Share Posted January 6, 2019 Hey @Peter Knight – weird, the redirects should be working… Will take a look, thanks ? Edit: Hmm, the links appear to be correct on the latest version… Link to comment Share on other sites More sharing options...
Peter Knight Posted January 6, 2019 Share Posted January 6, 2019 8 hours ago, Mike Rockett said: Hey @Peter Knight – weird, the redirects should be working… Will take a look, thanks ? Edit: Hmm, the links appear to be correct on the latest version… Hi Mike Must be an out-dated version of Jumplinks (1.5.48) The Examples link goes here: https://rockett.pw/jumplinks/examples Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 8, 2019 Author Share Posted January 8, 2019 On 1/6/2019 at 5:32 PM, Peter Knight said: Must be an out-dated version of Jumplinks (1.5.48) The Examples link goes here: https://rockett.pw/jumplinks/examples Indeed - 1.5.50 has the correct links. ? Link to comment Share on other sites More sharing options...
Peter Knight Posted January 8, 2019 Share Posted January 8, 2019 6 minutes ago, Mike Rockett said: Indeed - 1.5.50 has the correct links. ? Good excuse to use Jumplinks here ? Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 8, 2019 Author Share Posted January 8, 2019 Just now, Peter Knight said: Good excuse to use Jumplinks here ? Haha, if only the site site was PW-powered. It's just a lander running on Netlify. Might add in some sort of wildcard redirect to the new docs home. ? Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 22, 2019 Author Share Posted January 22, 2019 Don't have a chance to look into this right now, but is anyone having issues on PHP 7.3? Saw a comment on the module listing from Alex Capes about it breaking. In the meantime, I've opened up an issue over at GitLab: https://gitlab.com/rockettpw/seo/jumplinks-one/issues/1 @Karinne Cyphers - only saw your note now, sorry about that! It's likely due to rules 16a/16b in htaccess. 16a limits the characters allowed in a URL, so hits would never even boot up ProcessWire. Try changing to 16b (and adding the tilde if it's not there). ——— Future Development / v2 I profusely apologise for how long it's taken to get things done for v2. As some of you know, my daily responsibilities have taken over, and committing time to open-source projects is not there as it once was. I'd love to be able to say that I can try find some time to get to it, but it's simply a promise I can't make or keep, unfortunately… The way I see it, there are two options on the table. First is to wait it out (I know, I know…) – I do have a project board on the old repo, so I know what stands where and what I'd envisioned for the module, and can pick things up where I left off last (phew, haven't touched jQuery in forever – that might be a challenge), when the time avails itself. Technically, I'm about half way there but there's still quite a bit of work to do in terms of frontend. Second option would be for someone to take over the project. It'd definitely need to be someone who can commit the time to its development, and develop in line with the way in which the module has been built so far (there's a decent amount of SoC going on, and the module is built up using packages such as Eloquent, FastRoute, etc.). Alternatively, as a third option, we could take a multi-contributor approach. So, if anyone is interested, feel free to send me a DM and we can chat about it. 2 1 Link to comment Share on other sites More sharing options...
alexcapes Posted January 25, 2019 Share Posted January 25, 2019 On 1/22/2019 at 5:38 PM, Mike Rockett said: Don't have a chance to look into this right now, but is anyone having issues on PHP 7.3? Saw a comment on the module listing from Alex Capes about it breaking. In the meantime, I've opened up an issue over at GitLab: https://gitlab.com/rockettpw/seo/jumplinks-one/issues/1 Running PHP 7.3.1 with the latest version of Jumplinks return a blank page for me. PHP 7.2.14 seems to work fine. Link to comment Share on other sites More sharing options...
Karinne Cyphers Posted February 14, 2019 Share Posted February 14, 2019 @Mike RockettThank you for the advice... we've tried that but we are not having any luck. Moreover, we've noticed now that all our redirects are failing and will either error out or get stuck in a loop. We are getting this error for users not logged in with Tracy: Warning: preg_replace_callback(): Compilation failed: invalid range in character class at offset 6 in /var/www/html/site/assets/cache/FileCompiler/site/modules/ProcessJumplinks/ProcessJumplinks.module.php I'm thinking this may have something to do with PHP 7.3.x. We are running both 7.3.1 and 7.3.2 on our dev and production machines. Any advice for a workaround? Thank you. Link to comment Share on other sites More sharing options...
dragan Posted February 14, 2019 Share Posted February 14, 2019 Did you try to delete everything in site/assets/cache/FileCompiler/site/modules/ProcessJumplinks/ ? And maybe also go to modules > clear compiled files (button at the bottom). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now