Jump to content

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

Share this post


Link to post
Share on other sites

How would I setup a jumplink that does something like this:

articles.html?tags=*.* to one page

with *.* I mean everything possible behind that

sorry about this noob question but I just can't figure it out.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Indeed - it is fine to leave the tag out of the destination. It must be used in the source as Jumplinks checks the request from beginning to end.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

This is what the editor looks like now. Just trying to figure out the above regarding the assignment of the selectors before I push to the dev branch - if anyone could help me out with that, I'd appreciate it.

post-2289-0-19580700-1440693445_thumb.jp

Edited by Mike Rockett
  • Like 1

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By BitPoet
      As threatened in Ryan's announcement for 3.0.139, I built a little module for sliding toggles as a replacement for checkboxes. Styling of the input is CSS3 only (with all the usual caveats about older browsers), no JS necessary, and may still be a bit "rough around the edges", so to speak, since I didn't have much time for testing on different devices or brushing things up enough so I'd feel comfortable pushing it to the module directory. But here's the link to the GitHub repo for now:
      InputfieldSlideToggle
      Fieldtype and Inputfield that implements smartphone-style toggles as replacement for checkbox inputs. The visualization is CSS-only, no additional JS necessary.
      Status
      Still very alpha, use with caution!
      Features / Field Settings
      Size
      You can render the toggles in four different sizes: small, medium, large and extra large.
      Off Color
      Currently, "unchecked" toggles can be displayed either in grey (default) or red.
      On Color
      "Checked" toggles can be rendered in one of these colors: blue (default), black, green, grey, orange or red.
      Screenshots

      Some examples with checkbox label


      View all Size and Color Combinations
      Small toggles Medium toggles Big toggles Extra big toggles  









    • By Orkun
      Hi Guys
      I needed to add extended functionalities for the InputfieldDatetime Module (module is from processwire version 2.7.3) because of a Request of Customer.
      So I duplicated the module and placed it under /site/modules/.
      I have added 3 new Settings to the InputfieldDatetime Module.
      1. Day Restriction - Restrict different days based on weekdays selection (e.g. saturday, sunday) - WORKING

       
      2. Time Slots - Define Time slots based on custom Integer Value (max is 60 for 1 hour) - WORKING

       
      3. Time Range Rules per Weekday - Define a minTime and MaxTime per Weekday (e.g. Opening Hours of a Restaurant) - NOT WORKING PROPERLY

       
      The Problem
      Time Slots and Day Restriction working fine so far. But the Time Range Rules per Weekday doesn't work right.
      What should happen is, that when you click on a date, it should update the minTime and maxTime of the Time Select.
      But the change on the select only happens if you select a date 2 times or when you select a date 1 time and then close the datepicker and reopen it again.
      The time select doesn't get change when you select a date 1 time and don't close the picker.
      Here is the whole extended InputfieldDatetime Module.
      The Files that I have changed:
      InputfieldDatetime.module InputfieldDatetime.js jquery-ui-timepicker-addon.js (https://trentrichardson.com/examples/timepicker/) - updated it to the newest version, because minTime and maxTime Option was only available in the new version  
      Thats the Part of the JS that is not working correctly:
      if(datetimerules && datetimerules.length){ options.onSelect = function(date, inst) { var day = $(this).datetimepicker("getDate").getDay(); day = day.toString(); var mintime = $(this).attr('data-weekday'+day+'-mintime'); var maxtime = $(this).attr('data-weekday'+day+'-maxtime'); console.log("weekday: "+day); console.log("minTime: "+mintime); console.log("maxTime: "+maxtime); var optionsAll = $(this).datetimepicker( "option", "all" ); optionsAll.minTime = mintime; optionsAll.maxTime = maxtime; $(this).datetimepicker('destroy'); $(this).datetimepicker(optionsAll); $(this).datetimepicker('refresh'); //$.datepicker._selectDate($(this).attr("id"),date); //$.datepicker._base_getDateDatepicker(); // var inst = $.datepicker._getInst($(this)); // $.datepicker._updateDatepicker(inst); /*$(this).datetimepicker('destroy'); InputfieldDatetimeDatepicker($(this), mintime, maxtime); $(this).datetimepicker('refresh'); */ // $(this).datetimepicker('option', {minTime: mintime, maxTime: maxtime}); } } Can you have a look and find out what the Problem is?
      InputfieldDatetime.zip
       
      Kind Regards
      Orkun
    • By teppo
      This module tracks changes, additions, removals etc. of public (as in "not under admin") pages of your site. Like it's name says, it doesn't attempt to be a version control system or anything like that - just a log of what's happened.
      At the moment it's still a work in progress and will most likely be a victim of many ruthless this-won't-work-let's-try-that-instead cycles, but I believe I've nailed basic functionality well enough to post it here.. so, once again, I'll be happy to hear any comments you folks can provide
      https://modules.processwire.com/modules/process-changelog/
      https://github.com/teppokoivula/ProcessChangelog
      How does it work?
      Exactly like it's (sort of) predecessor, Process Changelog actually consists of two modules: Process Changelog and Process Changelog Hooks. Hooks module exists only to serve main module by hooking into various functions within Pages class, collecting data of performed operations, refining it and keeping up a log of events in it's own custom database table (process_changelog.) Visible part is managed by Process Changelog, which provides users a (relatively) pretty view of the contents of said log table.
      How do you use it?
      When installed this module adds new page called Changelog under Admin > Setup which provides you with a table view of collected data and basic filtering tools See attached screenshots to get a general idea about what that page should look like after a while.
      For detailed installation instructions etc. see README.md.
       


    • By Gadgetto
      Status update links (inside this thread) for SnipWire development will be always posted here:
      2019-08-08
      2019-06-15
      2019-06-02
      2019-05-25
      If you are interested, you can test the current state of development:
      https://github.com/gadgetto/SnipWire
      Please note that the software is not yet intended for use in a production system (alpha version).
      If you like, you can also submit feature requests and suggestions for improvement. I also accept pull requests.
      ---- INITIAL POST FROM 2019-05-25 ----
      I wanted to let you know that I am currently working on a new ProcessWire module that fully integrates the Snipcart Shopping Cart System into ProcessWire. (this is a customer project, so I had to postpone the development of my other module GroupMailer).
      The new module SnipWire offers full integration of the Snipcart Shopping Cart System into ProcessWire.
      Here are some highlights:
      simple setup with (optional) pre-installed templates, product fields, sample products (quasi a complete shop system to get started immediately) store dashboard with all data from the snipcart system (no change to the snipcart dashboard itself required) Integrated REST API for controlling and querying snipcart data webhooks to trigger events from Snipcart (new order, new customer, etc.) multi currency support self-defined/configurable tax rates etc. Development is already well advanced and I plan to release the module in the next 2-3 months.
      I'm not sure yet if this will be a "Pro" module or if it will be made available for free.
      I would be grateful for suggestions and hints!
      (please have a look at the screenshots to get an idea what I'm talking about)
       




    • By apeisa
      Update 31.7.2019: AdminBar is now maintained by @teppo. Modules directory entry has been updated, as well as the "grab the code" link below.
      ***
      Latest screencast: http://www.screencas...73-ab3ba1fea30c
      Grab the code: https://github.com/teppokoivula/AdminBar
      ***
      I put this Adminbar thingy (from here: http://processwire.c...topic,50.0.html) to modules section and to it's own topic.
      I recorded quick and messy screencast (really, my first screencast ever) to show what I have made so far. You can see it from here: http://www.screencas...18-1bc0d49841b4
      When the modal goes off, I click on the "dark side". I make it so fast on screencast, so it might seem a little bit confusing. Current way is, that you can edit, go back to see the site (without saving anything), continue editing and save. After that you still have the edit window, but if you click "dark side" after saving, then the whole page will be reloaded and you see new edits live.
      I am not sure if that is best way: there are some strengths in this thinking, but it is probably better that after saving there shouldn't be a possibility to continue editing. It might confuse because then if you make edits, click on dark side -> *page refresh* -> You lose your edits.
      ***
      When I get my "starting module" from Ryan, I will turn this into real module. Now I had to make some little tweaks to ProcessPageEdit.module (to keep modal after form submits). These probably won't hurt anything:
      if($this->redirectUrl) $this->session->redirect($this->redirectUrl); if(!empty($_GET['modal'])) $this->session->redirect("./?id={$this->page->id}&modal=true"); // NEW LINE else $this->session->redirect("./?id={$this->page->id}");   and...
      if(!empty($_GET['modal'])) { $form->attr('action', './?id=' . $this->id . '&modal=true'); } else { $form->attr('action', './?id=' . $this->id); // OLD LINE }  
×
×
  • Create New...