Mike Rockett Posted January 22, 2015 Author Share Posted January 22, 2015 That does sound like a great idea indeed. Ever think we'd have any validation issues? (May not even be a valid question - just popped into my head as I was thinking "raw import".) Also, surely this would only apply to WP sites that are not URL-friendly? Or does Google also happen to index those horrid ?p={id} things anyway? Link to comment Share on other sites More sharing options...
LostKobrakai Posted January 22, 2015 Share Posted January 22, 2015 I just looked a a single example Wordpress site, which happend to have the pretty url in the canonical tag. So google shouldn't know about the ugly ones as long as you're using only pretty urls. Link to comment Share on other sites More sharing options...
adrian Posted January 22, 2015 Share Posted January 22, 2015 Well it's just that WP URL's often have the date in the URL and there are a few different format options. Of course this could be replicated in PW, but typically it isn't, so I was mostly wanting to redirect from the pretty WP format to the PW format. Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 22, 2015 Author Share Posted January 22, 2015 So, we'd be looking to redirect /2015/01/hello-world to /blog/hello-world, for example? Would a simple call like this suffice: $jumplinks = $modules->get('ProcessJumplinks'); $jumplinks->add('{year}/{month}/{path}','blog/{path}'); -- Side note: would you mind renaming this topic to "Module: Jumplinks" and moving it up to "Modules/Plugins"? (also, I think the tags should go...) I just don't want to open up a new topic when I release the final. 1 Link to comment Share on other sites More sharing options...
LostKobrakai Posted January 22, 2015 Share Posted January 22, 2015 You can edit the topics title by editing the first post in the full editor. 1 Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 22, 2015 Author Share Posted January 22, 2015 Thanks - didn't know that... Link to comment Share on other sites More sharing options...
kongondo Posted January 22, 2015 Share Posted January 22, 2015 Mod note: Moved to Modules/Plugins forum... 2 Link to comment Share on other sites More sharing options...
adrian Posted January 22, 2015 Share Posted January 22, 2015 So, we'd be looking to redirect /2015/01/hello-world to /blog/hello-world, for example? Would a simple call like this suffice: $jumplinks = $modules->get('ProcessJumplinks'); $jumplinks->add('{year}/{month}/{path}','blog/{path}'); -- Side note: would you mind renaming this topic to "Module: Jumplinks" and moving it up to "Modules/Plugins"? (also, I think the tags should go...) I just don't want to open up a new topic when I release the final. Actually, I think you are right. Although there might need to be a slight variation on that, depending on the WP source format. I hadn't ever looked at the canonical link info, so knowing that is set up correctly, I guess we don't need to worry about those ID based links - guess there really isn't much to do afterall PS the "k" man beat me to moving this thread! Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 22, 2015 Author Share Posted January 22, 2015 Actually, I think you are right. Although there might need to be a slight variation on that, depending on the WP source format. I hadn't ever looked at the canonical link info, so knowing that is set up correctly, I guess we don't need to worry about those ID based links - guess there really isn't much to do afterall PS the "k" man beat me to moving this thread! There would indeed - you'd have to parse that out for each segment, and then send it off to Jumplinks. Does the migrator automatically handle URI changes? (I may just be having a blonde moment here...) Link to comment Share on other sites More sharing options...
adrian Posted January 23, 2015 Share Posted January 23, 2015 Does the migrator automatically handle URI changes? Sorry - not sure what you mean here - changes from when till when? Sorry, now I think I am the one having the blonde moment Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 23, 2015 Author Share Posted January 23, 2015 Sorry - not sure what you mean here - changes from when till when? Sorry, now I think I am the one having the blonde moment Got confused because you asked for a feature, and with good reason, and then you said it's not needed any more. For some reason, or the other, I assumed that the migrator handles old/new URIs and redirects accordingly... (I haven't used the module, so I don't know it's feature-set.) Or I'm missing something Link to comment Share on other sites More sharing options...
owzim Posted January 23, 2015 Share Posted January 23, 2015 Blonde moment? Please don't! Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 24, 2015 Author Share Posted January 24, 2015 Bumped to 0.9.3-beta. Added import from ProcessRedirects. (Did some bug squashing too.) 1 Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 24, 2015 Author Share Posted January 24, 2015 First post cleaned up as documentation is [mostly] ready. Module is now stable, from what I can tell, though v1 can only be released when PW 2.6 is released. (I'm assuming this is still a little while away... yes?) 2 Link to comment Share on other sites More sharing options...
Nico Knoll Posted January 24, 2015 Share Posted January 24, 2015 I think it's not that far away. At least the roadmap says Winter/Spring 2015: http://processwire.com/about/roadmap/#processwire-2.6-winter-spring-2015 Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 24, 2015 Author Share Posted January 24, 2015 Yeah, I did see that - just thought maybe someone could throw in a few hints. ;-) Because the module is pretty much done, and ready for release (I've even just made a few screencasts which I'll upload in the morning), I'm now wondering (again) if I should make this compatible with 2.5. I guess I jumped over to the 2.6-requirement because I just love the new ModuleConfig. But, I'm sure there are quite a few people who won't be moving over to 2.6 immediately, and that would like to use Jumplinks. So I think I'll just do it. 1 Link to comment Share on other sites More sharing options...
apeisa Posted January 24, 2015 Share Posted January 24, 2015 I would probably keep this 2.6 only. Most use is when releasing new site, so probably most usage will be with latest and greatest Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 24, 2015 Author Share Posted January 24, 2015 I would probably keep this 2.6 only. Most use is when releasing new site, so probably most usage will be with latest and greatest Indeed, though it's a bit late. Done already. Hehe! And it works with 2.6 _________ Last round of bug-hunting (help would be awesome) before I release v1 tomorrow morning. 1 Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 24, 2015 Author Share Posted January 24, 2015 Seems to all be a-okay. v1 sent off to modules directory. 2 Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 25, 2015 Author Share Posted January 25, 2015 @adrian - I have added an API method, I'm sure it will come in handy. $this->modules->ProcessJumplinks->add(string $source, string $destination, string $start = '', string $end = '') I think that the WP migrator module should check the permalink format being used (%year%/%monthnum%/%postname%/, for example) and convert it to the Jumplinks-equivalent ({year}/{month}/{name}/, in this case). 3 Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 28, 2015 Author Share Posted January 28, 2015 Some issues have popped up (regarding timestamps, paths in Windows, execute hyphens, etc) and, thanks to Dave's help in finding them, they have been fixed. Also rolled back to Beta (bumped to 1.0.2 - leaving the version in v1 state) in case any more anomalies pop up. 1 Link to comment Share on other sites More sharing options...
Dave Damage Posted January 28, 2015 Share Posted January 28, 2015 A sidenote for all people using a Debian-Server. The module requires PHP 5.5 which isn't included in the stable repository of Wheezy (yet), but you can use https://www.dotdeb.org/instructions/ or compile from source. [Edit:] Fixed by Mike. 1 Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 28, 2015 Author Share Posted January 28, 2015 I'll need to look into this... not sure what's making it require PHP 5.5... (Going to quickly test on an 5.4, and 5,3 to see what the problem could be.) Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 28, 2015 Author Share Posted January 28, 2015 Ah, it seems that empty() is the culprit here, requiring write access to its argument. Have pushed the fix to the repo. Works on 5.4 now. (As for 5.3, I don't know yet, but it could well just be fine.) 2 Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 28, 2015 Author Share Posted January 28, 2015 Feature added: the ability to add mapping collections via an API call. Docs here. 1 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