Jump to content

Recommended Posts

@Karinne Cyphers I've pushed up 1.5.52 which attempts to fix the change that PHP 7.3 made to preg_*, where hyphens need to be escaped if not at the end of a character set in an expression. Not able to test on my side, so please could you update and let me know if it runs? Thanks!

Share this post


Link to post
Share on other sites

Unfortunately, Using 1.5.52 created a number of issues for us.  We did downgrade our servers to PHP 7.2.x and for us, using 1.5.51 generates far fewer errors.  With 52 we were having an issue where the headers weren't being set and our cookies we use for different forms weren't being set.

Share this post


Link to post
Share on other sites

Hi @Mike Rockett

I'm moving WP site to PW where I have such URLs with Cyrillic characters 

2018/11/16/обухівських-школярів-навчать-писати/

and actualy it doesn't work. I have turned on debug mode and it says that there is no match.  

Also, I have tried to use Wildcards like

Source 
{year:num}/{month:num}/{date}/{title:segment}
Destination
[template=archive-item,archive_url=/{year}/{month}/{date}/{title}/]]

In the archive-item template, I have field archive_url that contain full URL in the format '/2018/11/16/обухівських-школярів-навчать-писати/'.

Have I missed something?

Thanks. 

Share this post


Link to post
Share on other sites

@wbmnfktr @Mike Rockett Thanks, but I'm not sure that you understand me correctly.

On PW site I don't want to use UTF8 name, but I have such URLs on the old site and I want to make a redirect from URLs like '2018/11/16/обухівських-школярів-навчать-писати/' to some destination page.

Currently, I tracked down that it's relative to urldecode/urlencode. 

For example, I have such jumplink

818805764_FireShotCapture016-JumplinksProcessWire_-http___obukhiv.test_admin_setup_jumplinks_entity_.png.05f69c74b3b2f92ca0580086db7168cf.png

Here is the output of Jumplink debug mode

1996786726_FireShotCapture017--http___obukhiv.test_4000_D182D0B5D181D182.png.74d4ffb4767c77cbb265551263507bee.png

617614397_FireShotCapture018--http___obukhiv.test_4000_D182D0B5D181D182.png.d3691c8df9cb8c08f0fff7d27797c614.png

 

As you can see "request" is not urldecoded, but we are trying match decoded string.

If I change this code on line 204 https://gitlab.com/rockettpw/seo/jumplinks-one/blob/master/ProcessJumplinks.module.php#L204

$this->request = ltrim(@$_SERVER['REQUEST_URI'], '/');

to

$this->request = urldecode(ltrim(@$_SERVER['REQUEST_URI'], '/'));

I get such output

874305864_FireShotCapture019--http___obukhiv.test_4000_D182D0B5D181D182.png.acde5f0327ada612a6b3c28fdcc6bc95.png

1162875510_FireShotCapture021--http___obukhiv.test_4000_D182D0B5D181D182.png.802a63b3a86d8afb391b91db114a15e8.png

-------------

The next issue is that I can't get wildcards to work with Cyrillic characters

1737388865_FireShotCapture022--http___obukhiv.test_4000_2014_06_18_D183D187D0BDD196-D188D0.thumb.png.69c5a923c58c747b343a746ed12be314.png

 

Share this post


Link to post
Share on other sites

It's weird. I have managed to get it working with German umlauts, but not with cyrillic characters.

I guess the culprit is not line 204, but further below:

$input = iconv('utf-8', 'us-ascii//TRANSLIT', $input);

I've tried to implement the fix suggested here, but it still didn't work... (1st user-contributed note).

Share this post


Link to post
Share on other sites

Hi everyone! Does anyone know if it's possible to map a source url taking into account optional string at the end? For example:

Source -> Destination

example.com/es/this-is-a-nice-url -> example.com/es/this-is-a-nice-url

example.com/es/this-is-a-nice-url-1 -> example.com/posts/this-is-a-nice-url

example.com/es/this-is-a-nice-url-2 -> example.com/posts/this-is-a-nice-url

 

Making the "-1" or "-2" optional.

Share this post


Link to post
Share on other sites
On 3/23/2019 at 4:10 PM, dragan said:

It's weird. I have managed to get it working with German umlauts, but not with cyrillic characters.

I guess the culprit is not line 204, but further below:


$input = iconv('utf-8', 'us-ascii//TRANSLIT', $input);

I've tried to implement the fix suggested here, but it still didn't work... (1st user-contributed note).

These regex expressions don't not match Cyrillic characters

https://gitlab.com/rockettpw/seo/jumplinks-one/blob/master/ProcessJumplinks.module.php#L94

https://gitlab.com/rockettpw/seo/jumplinks-one/blob/master/ProcessJumplinks.module.php#L95

https://gitlab.com/rockettpw/seo/jumplinks-one/blob/master/ProcessJumplinks.module.php#L98

https://gitlab.com/rockettpw/seo/jumplinks-one/blob/master/ProcessJumplinks.module.php#L99

They should be changed to something like

[\wа-я]+/ig

 

Share this post


Link to post
Share on other sites
6 hours ago, elabx said:

Hi everyone! Does anyone know if it's possible to map a source url taking into account optional string at the end? For example:

Source -> Destination

example.com/es/this-is-a-nice-url -> example.com/es/this-is-a-nice-url

example.com/es/this-is-a-nice-url-1 -> example.com/posts/this-is-a-nice-url

example.com/es/this-is-a-nice-url-2 -> example.com/posts/this-is-a-nice-url

 

Making the "-1" or "-2" optional.

 

Not tested

content/{path}/some-url[-{num}]

Share this post


Link to post
Share on other sites
4 hours ago, Zeka said:

Not tested


content/{path}/some-url[-{num}]

Didn't work unfortunately 😞

Share this post


Link to post
Share on other sites

Feature request, Mike. I know you're busy so just putting it out there.

I am logging 404 hits to a site that get's a ton of spam links. An old SEO spam issue which I am cleaning up.

Anyway, I notice that the jumplinks database table was becoming huge and had bloated to thousands of enties making the database itself very large.

That better house-keeping is my responsibility but wondered if a feature might be useful to optionally auto-delete these over a certain threshold. Or possibly send an email or notification that the logs were becoming quite big etc.

 

Share this post


Link to post
Share on other sites
On 4/10/2019 at 6:45 PM, elabx said:

Hi everyone! Does anyone know if it's possible to map a source url taking into account optional string at the end? For example:

Source -> Destination

example.com/es/this-is-a-nice-url -> example.com/es/this-is-a-nice-url

example.com/es/this-is-a-nice-url-1 -> example.com/posts/this-is-a-nice-url

example.com/es/this-is-a-nice-url-2 -> example.com/posts/this-is-a-nice-url

 

Making the "-1" or "-2" optional.

Unfortunately, this isn't built in as a feature, but I'm thinking the non-capture feature might work for you. Not tested, but try using <[-]{1}[\d*]> at the end of the source.

On 4/13/2019 at 2:31 PM, Peter Knight said:

Feature request, Mike. I know you're busy so just putting it out there.

I am logging 404 hits to a site that get's a ton of spam links. An old SEO spam issue which I am cleaning up.

Anyway, I notice that the jumplinks database table was becoming huge and had bloated to thousands of enties making the database itself very large.

That better house-keeping is my responsibility but wondered if a feature might be useful to optionally auto-delete these over a certain threshold. Or possibly send an email or notification that the logs were becoming quite big etc.

 

Thanks Peter – I recall wanting to do this for v2, where you choose how many you'd like to retain in the log.

I think I'm gonna need to find some time to finish v2. Will likely need to make a few changes here and there (not up to speed with all the new core-dev) before I proceed with the frontend work that's still due. 

  • Like 2

Share this post


Link to post
Share on other sites

Just a note on unicode support: this is vastly improved in v2, once rule 16b is in use. Not planning on bringing it to v1, unfortunately.

Share this post


Link to post
Share on other sites

Hey Mike,

is there anything the community could do to support you with v2? The new version is highly anticipated 🙂

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the reply @Mike Rockett!

In a completely different scneario, I am trying this as source: 

[propiedades]/detalle_propiedad/1363/some-segment[/][?b=1]

(As destination it's a plain url)

So that it would match:

  • detalle_propiedad/1363/casa-en-preventa-colonia-maya?b=1
  • detalle_propiedad/1363/casa-en-preventa-colonia-maya/?b=1
  • propiedades/detalle_propiedad/1363/casa-en-preventa-colonia-maya/?b=1

Does anyone know if I am correct in this assumption?

EDIT: Solved it with two jumplinks like this:

  • {segments}/{num:num}/{segment}/?b=1
  • {segments}/{num:num}/{segment}?b=1

I also think there might be something the community could do to help? Funding? "Crowdfunding"? Though maybe Mike's slammed with client work or sth and that's it haha

Share this post


Link to post
Share on other sites
On 4/17/2019 at 1:20 AM, elabx said:

I also think there might be something the community could do to help? Funding? "Crowdfunding"? Though maybe Mike's slammed with client work or sth and that's it haha

Under normal circumstances, contributions to OSS help out with continued development – issue on my side is exactly that: slammed with work. With that said, there are several public holidays coming up (four-day weeks for two/three weeks), so I think I can slot in some time to get things going here and at maybe even put up a testing version of sorts next month. Further on down the line, when it's stable, we'd definitely need to look at getting someone onboard to assist with maintenance.

  • Like 1

Share this post


Link to post
Share on other sites

Hi Mike, the update 1.5.53->1.5.54 with the PW "Upgrades" plugin does not work (worked before). It re-installes the old version.

Share this post


Link to post
Share on other sites

Hey @Mike Rockett – just wondering if you could add this module to Packagist as well? Would make installing via Composer nice and easy 🙂

Again setting type as pw-module and adding wireframe-framework/processwire-composer-installer as a dependency would be perfect. Thanks in advance for considering!

Share this post


Link to post
Share on other sites

Hi everyone,

I oversaw a site migration recently. A large part of the legacy site's URL structure changed and we installed Jumplinks to manage all the redirects.

Since the launch I've been monitoring 404s in Google Analytics and we appear to getting quite a few (around 40 per week). What's odd is that the affected URLs all have jumplinks in places, and when I test them the redirects work perfectly fine. 

I can't see why Analytics would be picking these up but I'm quite concerned- if anyone as any insight it would be greatly appreciated.

Best

Harry

 

Screenshot 2019-07-11 at 14.05.23.png

Screenshot 2019-07-11 at 14.06.22.png

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...