Jump to content

Recommended Posts

I'm not sure how to set it up.

When specify a destination, it could only select a page from page tree or something like page:1017

1017 is the page id

but how to specify page id 1017 of other language ?

Due to the way the tree module works, I am not able to show the pages in all languages within Jumplinks. You may need to switch languages in the admin panel to see the pages in that language. You can also manually specify the destination without using the page tree or auto complete fields.

Share this post


Link to post
Share on other sites

Hi Peter,

I'm not sure why that is happening...

What version of Jumplinks do you have?

Hi Mike

I have Jumplinks V 1.5.2 installed.

Same thing happened when I upgraded from PW 2.6.1 to 2.7.3. Possibly the same site.

Share this post


Link to post
Share on other sites

The jumplink: 

[...]

works for the default language, the problem is when I try to redirect to the non-default language, Portuguese:

[...]

 BUT only redirects to the default language.

[...]

Or is there other workaround?

After playing around a bit I found the following workaround to force language specific redirects:

If you set the destination path to your language specific page the system will detect the related page and store the page as the target.

If you add a questionmark (introducing a querystring) at the end of the destination path jumplinks will leave the path as is and redirect will happen as expected.

This is not needed for redirects to the homepage.

Better solution would be to implement language specific targeting to the module. +1 to the wishlist from my side.

Share this post


Link to post
Share on other sites

After playing around a bit I found the following workaround to force language specific redirects:

If you set the destination path to your language specific page the system will detect the related page and store the page as the target.

If you add a questionmark (introducing a querystring) at the end of the destination path jumplinks will leave the path as is and redirect will happen as expected.

This is not needed for redirects to the homepage.

Better solution would be to implement language specific targeting to the module. +1 to the wishlist from my side.

Hi kixe - are you saying that if the module isn't storing the paths ID (page:id) in the database, but rather redirecting to its hardcoded URI, then it automatically redirects again to that same page in the correct language? (Forgive me if I've misunderstood... Also, not able to test right now - can only do so later today.)

Hi Mike

I have Jumplinks V 1.5.2 installed.

Same thing happened when I upgraded from PW 2.6.1 to 2.7.3. Possibly the same site.

I see - muct be an oversight on my side. Will try sort out a fix this afternoon (SAST)

Share this post


Link to post
Share on other sites

Hi kixe - are you saying that if the module isn't storing the paths ID (page:id) in the database, but rather redirecting to its hardcoded URI, then it automatically redirects again to that same page in the correct language? (Forgive me if I've misunderstood... Also, not able to test right now - can only do so later today.)

Example:

The website example.org is a multilanguage site with english as default language and german as second available language. The Name of the root page is 'en' for default language and 'de' for german.

If I want to redirect a not existing url to the new page with ID: 1234 and url '/en/archive/' I create a jumplink and type in '/en/archive/' as the target the system detects the page and stores: 'page:1234'

Redirect will target as expected to '/en/archive/'.

If I want to redirect to the page with ID: 1234 in the german version with url '/de/archiv/' I create a jumplink and type in '/de/archiv/' as the target the system detects the page and stores: 'page:1234' too.

Redirect will target  to '/en/archive/' and NOT to '/de/archiv/'.

To force a redirect to the german version I found a workaround by adding the questionmark (querystring) to the url. In this case the system doesn't detect the page and will store the path instead of the ID. Redirect will happen once and as expected.

Share this post


Link to post
Share on other sites

Example:

The website example.org is a multilanguage site with english as default language and german as second available language. The Name of the root page is 'en' for default language and 'de' for german.

If I want to redirect a not existing url to the new page with ID: 1234 and url '/en/archive/' I create a jumplink and type in '/en/archive/' as the target the system detects the page and stores: 'page:1234'

Redirect will target as expected to '/en/archive/'.

If I want to redirect to the page with ID: 1234 in the german version with url '/de/archiv/' I create a jumplink and type in '/de/archiv/' as the target the system detects the page and stores: 'page:1234' too.

Redirect will target  to '/en/archive/' and NOT to '/de/archiv/'.

To force a redirect to the german version I found a workaround by adding the questionmark (querystring) to the url. In this case the system doesn't detect the page and will store the path instead of the ID. Redirect will happen once and as expected.

Right, I see. Haven't worked on/with the module for a while, so forgot that it stores the Page ID when the hard-coded URI exists as a Page. The issue here is that I'm not experienced with regards to multi-lang sites. Do multi-lang pages share the same ID? So 1234 would represent both the English and German pages... No?

Share this post


Link to post
Share on other sites

I am experiencing this module to be a bit slow after a while. Note that I have not read the entire thread from 1 to 13 for solutions or limitation, just quick read a few pages. Or found anything on the webpage.

A few details on my installation:

  • About 330 jumplinks
  • It takes about 17 second to load the Jumplinks page/list
  • Registering new jumplinks also takes a good while (I am not sure if is because of saving or loading the Jumplinks page/list).
  • My webpage has about 120 000 pages.
  • Running 3.0.17

I can live with it being slow. Just thought I should mention it. And also hoping a little that there's a solution.

Share this post


Link to post
Share on other sites

I am experiencing this module to be a bit slow after a while. Note that I have not read the entire thread from 1 to 13 for solutions or limitation, just quick read a few pages. Or found anything on the webpage.

A few details on my installation:

  • About 330 jumplinks
  • It takes about 17 second to load the Jumplinks page/list
  • Registering new jumplinks also takes a good while (I am not sure if is because of saving or loading the Jumplinks page/list).
  • My webpage has about 120 000 pages.
  • Running 3.0.17

I can live with it being slow. Just thought I should mention it. And also hoping a little that there's a solution.

Hi laban,

Thanks for the insight on this - this is the first I'm hearing of Jumplinks running on a large site.

Jumplinks wasn't built for large sites - in fact, it wasn't something that crossed my mind when building it. That said, it does seem a little strange that this is happening. The only thing I think could slow it down is the multiple regex routines that the module makes use of - there are quite a lot, if you have a look at the code.

Without saying much more, I would be very interested to see a Blackfire/XDebug dump of this - perhaps I may be able to look into the details and speed up the new module. If you could do that for me, I'd be most grateful.

Unfortunately, I haven't been pyaing attention to the module of late - many other things on the plate at the moment. That said, I'm sure I'll be getting back into it soon with some new sites in the pipeline.

Thanks,

Mike

  • Like 1

Share this post


Link to post
Share on other sites

I have unfortunately no experience with debugging / BlackFire / XDebug. I have MAMP where I do my local development, and have activated Xdebug there, and downloaded MacGDBp. But that's all I have managed to do.

With some guidance there would of course be no problem for me to contribute! Is what I am saying. When you're ready.

Share this post


Link to post
Share on other sites

I have unfortunately no experience with debugging / BlackFire / XDebug. I have MAMP where I do my local development, and have activated Xdebug there, and downloaded MacGDBp. But that's all I have managed to do.

With some guidance there would of course be no problem for me to contribute! Is what I am saying. When you're ready.

I see - though, I admit: I'm pretty new to debug/profiling tools myself. It's quite simple, and I quite like XDebug, which is essentially a PHP extension that can profile your code as and when it is executed. It simply output the data to a file, which can then be opened using a client app.

I'll continue work on Jumplinks 2 as soon as I can. There are already performance boosts in terms of PW3 and the new module structure. Also, I think I'd like for the module to make use of SQL statements that limit what is returned - that way, it doesn't have to loop through large sets of data.

Lots of work ahead of me...

  • Like 1

Share this post


Link to post
Share on other sites

I am on pw 2.7.3 and have jumplinks 1.5.2

I can not delete any jumplink, when I click on the source I just get taken to the add new jumplink page.

Would be nice if this could be fixed.

Thanks

Share this post


Link to post
Share on other sites
2 hours ago, OllieMackJames said:

I am on pw 2.7.3 and have jumplinks 1.5.2

I can not delete any jumplink, when I click on the source I just get taken to the add new jumplink page.

Would be nice if this could be fixed.

Thanks

Hi Ollie,

I'm not able to test right now due to a server upgrade. That said, please can you check what link shows up in the status bar when you hover over a source? Also, what happens when you navigate to <admin>/setup/jumplinks/entity/?id=1 manually?

Share this post


Link to post
Share on other sites

@OllieMackJames - Sorry, I had a typo there. Meant to ask what happens when you manually go to the URL with id=19, the same URL that appears when you hover over a link. Nonetheless, I think there is a problem, as going to id=1 should edit the first jumplink you created. if id=0, then the module should create a new jupmlink.

To be clear, if you navigate to /pwire/setup/jumplinks/entity/?id=19, do you get to the Register New Jumplink page, and does the URL change? And lastly, what version of PHP are you running?

Is anyone else experiencing this problem?

Share this post


Link to post
Share on other sites

Hi Mike, took a while to log in here again.

I work with php 7.0.8

When I you navigate to /pwire/setup/jumplinks/entity/?id=19, I see the Register New Jumplink page, and this URL: /pwire/setup/jumplinks/entity/?id=19

Thanks for looking into it!

 

Share this post


Link to post
Share on other sites

Just voted this module up, great work! I used this for the first time, a client needed simple redirects and the cPanel solution didn't work well. The module worked like a charm, thanks! Having a built-in role was also nice to see.

At first sight I feel that two simple additions would make the module smarter from the UI side:

  1. Enable/disable checkbox for individual jumplinks: this would make easier disable items without having to delete them
  2. Preview link for jumplinks - perhaps to open them in a modal window, or panel in PW3?

Share this post


Link to post
Share on other sites

@tpr - Thanks, glad you like it.

I have started building Jumplinks 2 from the ground up, but haven't had the time to continue work on it of late.

With regards to the state-toggle: I can implement this feature, but it would be turned off by default. That said, if the feature gets enabled, the jumplinks would all be created to redirect with status code 302/307 (actuallly not 100% sure which one is better). That said, is isn't necessary to do so, but not doing so would mean going against the intention of the different HTTP codes.

As for previews: these can be somewhat difficult, giving consideration to parameters - I think I may have brought this up before here. It would be easy to preview jumplinks that don't have parameters, but those that do have them would need user input in order to test.

This is all on my to-do list for the new module, which will be compatible with both PW 2.8 and 3.0.

  • Like 3

Share this post


Link to post
Share on other sites

Thanks, these make sense. Another feature request (from the client) is to be able to reset multiple or all jumplinks' hit counters. Currently there are only a few but this sounds handy, eg when going live and would like to start with a clean slate.

Looking forward to v2!

  • Like 1

Share this post


Link to post
Share on other sites

Hi everyone, very sorry for the delays - as you may know, I've been too busy of late to attend to Jumplinks 2. I'm making time as a go along, and would like to briefly discuss the current work taking place.

I may or may not have mentioned that I'd like the new Jumplinks to be powered by FastRoute. This improves processing time by quite a bit (haven't measured, but there is far less preg_* going on) and makes development somewhat easier. By using it, however, the syntax for each jumplink would change; but I believe this to be a good thing.

As you well know, Jumplinks currently uses the {name:type} base syntax, where type is optional (this invokes smart wildcards). By moving to FastRoute, the base syntax would change to {name} only, which catches [^/]+ by default. That regex is typically used in an MVC framework context, and so may not be completely suitable for the purposes of this module - as such, I am sure this can be changed by overriding the RouteParser (we can default to what is currently used for the segment any type: [\w_-]+[\w.-_%\=\]+).

Then, the concept of smart wildcards would disappear, and you would be able to specify your own expressions instead - this is done in the format {name:<exp>}, where <exp> is the expression you would normally use inside of a regex capture group, such as [a-z0-9]+. However, we could add support for aliasing expressions so that the module behaves the same way as it currently does, by silently converting the aliases to their respective expressions, but also allowing more complex expressions to be used. (Note that I chose FastRoute as its syntax closely matches the current Jumplinks syntax, and allows for greater flexibility.)

Before Jumplinks 2 is launched, the current dev branch (which will then be moved to master) will be updated to include a JSON/CSV exporter to the Jumplinks 2 format. As an example, the exporter will automatically convert {page:segment} to {page:[\w_-]+}. However, if we choose to use the wildcard type aliasing (discussed above), then this exporter need only export the data on an as-is basis.

Note: Due to Jumplinks 2 development, all new features requested by the community will not be added to v1, but will be implemented in v2 instead. It will, however, be easy to migrate from v1 to v2 in order to use those features.

I also plan on making v2 compatible with only ProcessWire 2.8 and 3.0, and Mapping Collections will still be supported.

I'm writing about this now so that we can discuss it - I'd appreciate your thoughts on the change, which I think is beneficial to the module going forward.

(I hope everyone is doing well - haven't been around often enough to see new modules and some of the new progress on PW3; but getting there slowly.)

Update: I forgot to mention that FastRoute also allows for optional segments which allows us to jump from, say, /page.php?parent={parent}[&child={child}] to either, say, /{parent}/{child}/ or /{parent}/, depending on the input. Sure, I don't see a wide variety of use-cases for this feature, but I'm sure it'll come in handy to some.

Edited by Mike Rockett
Changed default parameter type
  • Like 6

Share this post


Link to post
Share on other sites

Small update from my side: I'm busy testing all of this out in a simple PHP script that imports FastRoute - so far, so good!

For the purposes of better understanding and correct approach, I'd like to also change the mapping collection syntax from:

{variable_name|collection_name}

to:

{collection_name(variable_name)}

I did want to use square parenthises, but I'd like to try and not conflict with FastRoute's optional params.
(Edit: Sorry, my mistake - FastRoute has nothing to do with destinations. I might switch back to pipes anyway... Not sure I like this format.)

Thoughts?

 

Update: Here's some testing output at the current stage:

Request URI: string(25) "/page.php?id=2&category=1"

Matched Jumplink Object: object(stdClass)#2 (2) {
  ["from"]=>
  string(47) "/page.php?id={page:\d+}&category={category:\d+}"
  ["to"]=>
  string(41) "/{categories(category)}/{page_ids(page)}/"
}

Captured Parameters: array(2) {
  ["page"]=>
  string(1) "2"
  ["category"]=>
  string(1) "1"
}

Identified Collection Item from page_ids: array(1) {
  [2]=>
  string(8) "about-us"
}

Identified Collection Item from categories: array(1) {
  [1]=>
  string(7) "company"
}

Compiled Destination: string(18) "/company/about-us/"

 

  • Like 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 Gadgetto
      Status update links (inside this thread) for SnipWire development will be always posted here:
      2019-10-18
      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 eelkenet
      Hi! I've created a small Inputfield module called InputfieldFloatRange which allows you to use an HTML5 <input type="range" ../> slider as an InputField. I needed something like this for a project where the client needs to be able to tweak this value more based on 'a feeling' than just entering a boring old number. Maybe more people can use this so I'm hereby releasing it into the wild.  
       
      What is it?
      The missing range slider Inputfield for Processwire. 
      What does it do?
      This module extends InputfieldFloat and allows you to use HTML5 range sliders for number fields in your templates.
      It includes a visible and editable value field, to override/tweak the value if required.  
      Features
      Min/max values Precision (number of decimals) Steps (Read more) Manual override of the selected value (will still adhere to the rules above) Usage
      Clone / zip repo Install FieldtypeFloatRange, this automatically installs the Inputfield Create new field of type `Float (range)` or convert an existing `Float`, `Integer` or `Text` field. To render the field's value simply echo `$page->field` Demo
      A field with Min=0, Max=1, Step=0.2, Precision=2

      Field with settings Min=0, Max=200, Step=0.25, Precision=2

       
      Todo
      Make the display-field's size configurable (will use the Input Size field setting)  Hopefully become redundant If it's usable for others I'll add it to the Modules list  
      Changelog
      v002
      - Fix issue where setting the step value to an empty value created problem with validation
      - Make the display-field optional 
      v001
      - Initial release
       
      Thanks!
       
       
    • By Robin S
      Another little admin helper module...
      Template Field Widths
      Adds a "Field widths" field to Edit Template that allows you to quickly set the widths of inputfields in the template.

      Why?
      When setting up a new template or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width. This module speeds up the process.
      Installation
      Install the Template Field Widths module.
      Config options
      You can set the default presentation of the "Field widths" field to collapsed or open. Field widths entered into the Template Field Widths inputfield are only applied if the Edit Template form is submitted with the Template Field Widths inputfield in an opened state. "Collapsed" is the recommended setting if you think you might also use core inputs for setting field widths in a template context. You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover. You can choose to show the original field width next to the template context field width.  
      https://github.com/Toutouwai/TemplateFieldWidths
      https://modules.processwire.com/modules/template-field-widths/
    • By adrian
      Tracy Debugger for ProcessWire
      The ultimate “swiss army knife” debugging and development tool for the ProcessWire CMF/CMS

       
      Integrates and extends Nette's Tracy debugging tool and adds 35+ custom tools designed for effective ProcessWire debugging and lightning fast development
      The most comprehensive set of instructions and examples is available at: https://adrianbj.github.io/TracyDebugger
      Modules Directory: http://modules.processwire.com/modules/tracy-debugger/
      Github: https://github.com/adrianbj/TracyDebugger
      A big thanks to @tpr for introducing me to Tracy and for the idea for this module and for significant feedback, testing, and feature suggestions.
×
×
  • Create New...