Jump to content

Jumplinks


Mike Rockett

Recommended Posts

Mike, thanks for the module, I just migrated a modx site to pw and am using this full on - running into trouble though.

When I input a jumplink it does a 302 and that is NOT good for google, I need them to be 301.

So the question is how can I make sure all the redirects are 301 and there are no 302

302 means google gets confused and that means my traffic hurts.

Thanks for the help!

Baie dankie

Thanks for identifying that, which is indeed a bug - not sure when it broke. Will check it out now.

Edit: Fixed - please update to 1.3.2.

  • Like 2
Link to comment
Share on other sites

You can just use articles.html?tags={tags:all} and then use {tags} in the destination.

Had a look at the docs for wildcards?

Thanks Mike,

I went for: articles.html?tags={tags:all} and then for destination I just picked one page, seems to do the trick

I did look at the wildcards documentation, but what I did not get was how to do 2 things, one is the example you gave and the second is I don't want {tags} in a destination I just wanted one particular page.

I am cleaning all those tag pages for panda reasons but some of them have incoming traffic and links, I now point that all to a sitemap type of page on my site.

Thanks for your help, much appreciated.

Link to comment
Share on other sites

Minor note regarding the 404 monitor: currently all hits to sitemap.xml (generated by Pete's Markup Sitemap XML module) are recorded as 404s.

Haven't had a proper look under the hood yet, but so far I'm guessing that both modules hook into pageNotFound, in which case this sounds like a priority issue or the logger not checking if another module has modified the output (however that should be implemented). Anyway, just something you might want to consider for the new 404 logger module.

For the record, the 404 logger is very handy when migrating a lot of content from one site to another, and it's also cool that one can easily register a new Jumplink from the 404 list. Great work, just like the rest of this module! :)

  • Like 2
Link to comment
Share on other sites

@Teppo - Yeah, it appears that this is indeed a priority issue. I wonder if I shouldn't push it back a bit? It's currently set to 10, and uses addHookBefore.

I can't exactly remember why I used an early event here - but when the two modules are separated, things will be different. Out of curiosity, how would I check to see if that output has been modified?

Regarding a timeline on these - I don't have one as yet. Currently spending most of my time starting up a special project. As it stands right now, JL is working as expected, and so should be good enough for a while. On most of my sites, I'm leaving the 404 monitor off due the heavy amount of false-positives showing up.

Link to comment
Share on other sites

Great module, but having a minor issue.

story-of-the-month set to redirect to story-of-the-month/ is redirecting fine

story-of-the-month?story=9 set to redirect to story-of-the-month/$mystory is redirecting to story-of-the-month/

Could this be because of Processwires normal behaviour to add a trailing slash? Tried removing the first redirect but no joy.

Link to comment
Share on other sites

Great module, but having a minor issue.

story-of-the-month set to redirect to story-of-the-month/ is redirecting fine

story-of-the-month?story=9 set to redirect to story-of-the-month/$mystory is redirecting to story-of-the-month/

Could this be because of Processwires normal behaviour to add a trailing slash? Tried removing the first redirect but no joy.

Please share what you used for the Source and Destination fields in your jumplink? To me, this is unrelated due to your use of $myStory, which looks like a PHP variable, and not a Jumplinks wildcard.

Also, does story-of-the-month exist in the Page Tree? If so, Jumplinks won't do anything with it as only 404-hits are handled.

Link to comment
Share on other sites

Yes, story-of-the-month does exist in the page tree, which is why I was pretty sure anything after that wont work. No worries, I will just attacked those with .htaccess.

Because Jumplinks reacts to the 404 event, only requests to story-of-the-month and story-of-the-month/ would be excluded. However, a request to story-of-the-month/something-that-does-not-exist would be sent off to Jumplinks.

Link to comment
Share on other sites

story-of-the-month?article=9 is not actually sent off to jumplinks, my guess was because Processwire sent it off to story-of-the-month/ internally?

Specifically, I'm referring to sub-pages of story-of-the-month. By making a request to story-of-the-month?article=9, it's really a request to story-of-the-month, which exists.

As such, the only alternative is to use mod_rewrite (the following two lines should be placed directly under RewriteEngine On):

RewriteCond %{QUERY_STRING} ^article=(\d+)$ [NC]
RewriteRule ^(story-of-the-month)/?$ /$1/%1 [R=301,END]
Link to comment
Share on other sites

  • 2 weeks later...

Continued from here...

@PeterKnight:

So I'm nearly done with this. One thing I need to know is this: how do I get AutoComplete to only allow one page selection? By default, it allows more than one, and there doesn't seem to be an option to prevent that...

Edit: Nevermind, got it - maxSelectedItems

Link to comment
Share on other sites

Now I need help with something...

When selecting a page via the tree, its ID is added to the text field so that Jumplinks may process it easily. Now, how do I accomplish the same thing with AutoComplete? Checking pageSelected doesn't seem to do it. The event doesn't get called (tested with an alert).

Additionally, how do I set the AutoComplete value when the tree is used?

Lastly, how do I set the tree value when AutoComplete is used?

Link to comment
Share on other sites

Hey Mike

Nice Module.

I've been using Redirects for a project and as mentioned I have 500 redirects to make. Actually, 400 left with 100 done.

I might port to JL as I like the wildcard integration.

Can I make a suggestion now that I've installed it?

1 The Destination column IMHO would be best displaying the new path and not the page title. Displaying the page title (to me) largely tells me nothing useful.

2 Minor point but the font sizes are different than the rest of the RenoTheme fonts. Not a biggie but when everything in Reno is so consistent it'd be nice to continue that. I appreciate you've 2 extra date columns and that could be reason for reducing font size.

Otherwise, nice job. The 404 Monitor is great :)

Edited by Peter Knight
Link to comment
Share on other sites

Hi Peter - Jumplinks is my own successor to Redirects. It was originally developed for Bolt CMS, but has now been fully adapted for ProcessWire. At present, yes it's stable. All the issues that have been encountered are closed, and don't have any complaints so far.

I think that Jumplinks is called earlier that Redirects in the event chain, so no clashing on that front. If the same redirect is defined in both, then Jumplinks will redirect first, and the Redirects module will not do anything. (I haven't actually tested this, but it should be the case.)

I do have plans to upgrade Jumplinks - it's really more of a coding issue than a practical one. Essentially, the module will remain mostly the same, and the upgrade will be seamless. Unfortunately, I don't get much time to look at it - as such, I remind myself that the current version is stable, and ready for production use, and so it isn't really an issue when I start writing Jumplinks 2.

However, the major part of Jumplinks 2 will be that the 404 monitor currently included with the module will be removed, and made available separately.

Give it a spin - if you like it, you can switch over. When I'm done with v2 (which won't be any time soon), you can upgrade with no hassles.

In the meantime, I do want to add the feature you suggested for Redirects, I think it's definitely quite useful for large sites.

  • Like 1
Link to comment
Share on other sites

Hey Mike

Nice Module.

I've been using Redirects for a project and as mentioned I have 500 redirects to make. Actually, 400 left with 100 done.

I might port to JL as I like the wildcard integration.

Can I make a suggestion now that I've installed it?

1 The Destination column IMHO would be best displaying the new path and not the page title. Displaying the page title (to me) largely tells me nothing useful.

2 Minor point but the font sizes are different than the rest of the RenoTheme fonts. Not a biggie but when everything in Reno is so consistent it'd be nice to continue that. I appreciate you've 2 extra date columns and that could be reason for reducing font size.

Otherwise, nice job. The 404 Monitor is great :)

Above response was for your original post.

Using the title is handy for smaller sites, but I do actually agree with you. Much of the module is really me testing things out. For consistency reasons, I'm going to make it dispay the path instead.

Regarding font sizes, those were deemed best for the common 1366x768 resolution. Anything larger than that, and it just doesn't fit nicely for me. Sure, on a large screen (if I remember correctly, you're using a Mac), it would appear differently. For the time being, I'm going to leave that as it is.

404 Monitor is in dire need of an upgrade, which is one of the aspects that prompted me to do a rewrite. It's usable in its current form, but can easily get overcrowded. Also, it's limited to 100 404s (it stores all of them, though), which is something I'd like to deal with when it becomes a separate module.

Glad you like it :)

  • Like 1
Link to comment
Share on other sites

Hey there, I'm new to this module but I was having some issues with * s for redirecting with the old redirect module and am having the same issue with this module as well. Has something changed in pw that is making this functionality no longer work? Not quite sure what to test.

Redirect path           New path
path/subpath/*         /newPath

this was working great a couple processwire versions ago, but now I just get 404s when I try to go to something like path/subpath/random_file.php

Link to comment
Share on other sites

Hey there, I'm new to this module but I was having some issues with * s for redirecting with the old redirect module and am having the same issue with this module as well. Has something changed in pw that is making this functionality no longer work? Not quite sure what to test.

Redirect path           New path
path/subpath/*         /newPath

this was working great a couple processwire versions ago, but now I just get 404s when I try to go to something like path/subpath/random_file.php

Hi MuchDev,

The asterisk wildcard was not part (and probably still is not part, haven't actually checked) of the original ProcessRedirects shipped via the modules directory. That was one of the reasons I did not include the functionality.

However, and more importantly, it's sometimes hard to tell what that wildcard implies. Sure, when used at the end of a path, it means "everything until the end", but, when used in the middle, does it represent 1 segment, or all segments? It could catch paths that were not meant to be caught.

I may look at implementing a proper solution for the importer to detect these, but that won't be soon.

As a recommendation, swap out the asterisk wildcards with {all} - this is a good base level. So, in your case:

    Source: path/subpath/{all}

    Destination: newPath

Have a look at the documentation on wildcards and smart wildcards - Jumplinks doesn't use regular expressions or asterisk wildcards.

There's also a new wiki page containing examples.

  • Like 1
Link to comment
Share on other sites

{all} is exactly what I was looking for. I must have hacked something in based on an example a while back and forgot about it. The paths are only ever one segment but they sometimes come in as /oldPath/subPath/oldFile.php or just /oldPath/subPath/ and I want both of those to just redirect to /newPath/.

Thanks for this great module and the help with this :).

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hi Guys, 

For some reason I cannot get JumpLinks 404 monitor to work, everything else is working and the CMS notifications show 404's but JumpLinks is not displaying the list of received 404's

Anyone have an idea why this could be? 

I am running PW 2.6.1

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...