Recommended Posts

5 hours ago, Mike Rockett said:

@Joss Hi - that's a legacy error from an earlier version of MySQL. What version are you running?

This is on a shared server and according to phpmyadmin, it is  5.1.73

Share this post


Link to post
Share on other sites

@Mike Rockett - Apparently, that error will also show on 5.5, which is what the server is running, the company have told me. I will probably migrate at some point.

Share this post


Link to post
Share on other sites
50 minutes ago, Joss said:

@Mike Rockett - Apparently, that error will also show on 5.5, which is what the server is running, the company have told me. I will probably migrate at some point.

I'd be inclined to switch to a newer version. Even 5.6.5, which is when they changed it, is considerably old now. Due to its age, I don't plan on supporting it.

In the interim, you could always try removing DEFAULT CURRENT_TIMESTAMP from the schema file (schema-create-mc.sql) before installation as the insert statement does force it. Untested, but it should work in theory.

Share this post


Link to post
Share on other sites

When I installed this module on my pw site, I got following two erros

 Module reported error during install (ProcessJumplinks): SQLSTATE[HY000]: General error: 1293 Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

Failed to init module: ProcessJumplinks - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lara_db.process_jumplinks' doesn't exist

pw 2.8.35
php 5.5.9
mysql 5.5.55

 

Share this post


Link to post
Share on other sites
On 7/12/2017 at 2:54 AM, adrianmak said:

When I installed this module on my pw site, I got following two erros

 Module reported error during install (ProcessJumplinks): SQLSTATE[HY000]: General error: 1293 Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

Failed to init module: ProcessJumplinks - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lara_db.process_jumplinks' doesn't exist

pw 2.8.35
php 5.5.9
mysql 5.5.55

 

Hi there - you will need to upgrade your version of MySQL. Version 5.5 is no longer supported, since end-2015. I recommend you use MySQL 5.7, or switch to MariaDB.

Share this post


Link to post
Share on other sites

Hi Mike

I have a multi-lingual MODX site which I've rebuilt in Processwire.

PW site isn't live but is on a test server.

As the MODX version currently has around 500 resources (lets say 500 URIs) I am keen to follow the old alleged Abraham Lincoln advice

Quote

Give me six hours to chop down a tree and I will spend the first four sharpening the axe.

I'm thinking of doing following and wanted to sanity check my approach

1. Get a sitemap of the entire MODX site into a XLS or CSV and import into Jumplinks

2. Manually go through each "old" URL and update to the new URL

Am I missing something crucial apart from keeping an eye on Google's Search Console (was Webmaster tools) and watching for 404 hits. I'll enable 404 monitoring on Jumplinks too.

Cheers for any pre flight advice. 

 

 

  • Like 1

Share this post


Link to post
Share on other sites
6 minutes ago, Peter Knight said:

Hi Mike

I have a multi-lingual MODX site which I've rebuilt in Processwire.

PW site isn't live but is on a test server.

As the MODX version currently has around 500 resources (lets say 500 URIs) I am keen to follow the old alleged Abraham Lincoln advice

I'm thinking of doing following and wanted to sanity check my approach

1. Get a sitemap of the entire MODX site into a XLS or CSV and import into Jumplinks

2. Manually go through each "old" URL and update to the new URL

Am I missing something crucial apart from keeping an eye on Google's Search Console (was Webmaster tools) and watching for 404 hits. I'll enable 404 monitoring on Jumplinks too.

Cheers for any pre flight advice. 

Hi Peter

  1. Can any of these resources/uris be combined into a pattern? If there are 500 resources, I'm sure the tree can be simplified somewhat, albeit aside technicalities such as the difference in how the two platforms create URIs (or if they've been manually set in modx).
  2. If you do a sitemap, how will you generate new uris to map to PW Pages?

At the end of the day, as long as things match up, I don't see any further issues. Not sure on how Modx works (I tried it once, didn't like it), but keep an eye out for trailing slashes as well.

In your specific instance, the 404 monitor is limited to 100 - you'd need to change the code to get it to show more, and that might be client-resource-intensive. JL2 will handle this better.

  • Like 1

Share this post


Link to post
Share on other sites
18 hours ago, Mike Rockett said:

Hi Peter

  1. Can any of these resources/uris be combined into a pattern? If there are 500 resources, I'm sure the tree can be simplified somewhat, albeit aside technicalities such as the difference in how the two platforms create URIs (or if they've been manually set in modx).
  2. If you do a sitemap, how will you generate new uris to map to PW Pages?

At the end of the day, as long as things match up, I don't see any further issues. Not sure on how Modx works (I tried it once, didn't like it), but keep an eye out for trailing slashes as well.

In your specific instance, the 404 monitor is limited to 100 - you'd need to change the code to get it to show more, and that might be client-resource-intensive. JL2 will handle this better.

Hi Mike

I think I'll prioritise the 100 or so most important URLs and then I can work through the others gradually. Client confirmed that actually they don't rank terrible well anyway so it looks like a relatively fresh start and the pressure is off.

Just have to upgrade to MySQL 5.6 as it's currently running 5.1.X


 

  • Like 1

Share this post


Link to post
Share on other sites

Hello Mike,

I'm trying to run Jumplinks on a server running MySQL 5.7.16, and I keep getting this error from ProcessWire:

Failed to init module: ProcessJumplinks - SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'last_hit'

This is Jumplinks version 1.5.48. We used the same version of the module on another site on the same server within the last few months, and it's working fine there - so I can't understand why this isn't working. It allows me to add redirects, but they don't redirect when loaded. I was also unable to edit the module configuration from the Manage Jumplinks page - the url changed to root/module/edit?name=ProcessJumplinks, and then gave the error "Unrecognized Path". 

 

If you have any insight you could offer, I'd be most appreciative! Thanks.

Share this post


Link to post
Share on other sites

Hi @melody - thanks for the post. This has popped up before, and still not sure as to why. When it happened, I asked Zeka to delete the last_hit column and refresh the modules. It turns out that he had to delete the process_jumplinks_nf table as well, and it started to work properly. Why that is the case, I still do not know... 

You can follow the brief thread from here to see what happened: 

Let me know if those steps work for you. You might land up having to add the nf table manually and increasing the schema version in the module's configuration via phpMyAdmin or whatever tool you use to manually edit DBs.

 

  • Like 1

Share this post


Link to post
Share on other sites

Hi @Mike Rockett -- @melody and I took a look at this this morning. It looks like this is an issue with 0000-00-00 00:00:00 null dates in our strict MySQL environment. After replacing the NULL_DATE constant at the top of the module file with 'CURRENT_TIMESTAMP' and replacing the 0000-00-00 00:00:00 dates in Blueprints/schema-update-v2.sql and Blueprints/schema-update-v3.sql with the same, the problem went away after re-installing the module.

Hope that helps.

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, thetuningspoon said:

Hi @Mike Rockett -- @melody and I took a look at this this morning. It looks like this is an issue with 0000-00-00 00:00:00 null dates in our strict MySQL environment. After replacing the NULL_DATE constant at the top of the module file with 'CURRENT_TIMESTAMP' and replacing the 0000-00-00 00:00:00 dates in Blueprints/schema-update-v2.sql and Blueprints/schema-update-v3.sql with the same, the problem went away after re-installing the module.

Hope that helps.

Thanks for letting me know. This date story has me in a tizz because I'm not seeing the correct way to use [auto-updating] timestamps and still support all MySQL enviros... Unless I'm missing something here. Had the same issue with Laravel, and they had to introduce nullableTimestamps() into the schema system. I'm actually using Illuminate for Jumplinks 2, but not sure if it'll work in every environment...

Share this post


Link to post
Share on other sites

Hi Mike

I'm creating Jumplinks for a multilingual site and I was wondering what you advise when I come across a URL like following in the 404 monitor

/it/products/hooks/ganci-piatto/182728

That's an old URL from the italian tree of the site

The reason I'm asking is because when I browse to tree or auto-complete, I can pull up the 1827288 product page but it's not necessarily italian.

Should I manually Specify a destination in these cases and ensure we're manually pointing at the correct launguage?
 

Share this post


Link to post
Share on other sites
16 hours ago, Peter Knight said:

Hi Mike

I'm creating Jumplinks for a multilingual site and I was wondering what you advise when I come across a URL like following in the 404 monitor

/it/products/hooks/ganci-piatto/182728

That's an old URL from the italian tree of the site

The reason I'm asking is because when I browse to tree or auto-complete, I can pull up the 1827288 product page but it's not necessarily italian.

Should I manually Specify a destination in these cases and ensure we're manually pointing at the correct launguage?
 

Hi Peter,

From the top of my head, you could potentially use mapping collections to make it language aware; however, that means importing the entire dataset and using multiple languages - one collection for each language. How are your other URIs being handled?

Share this post


Link to post
Share on other sites
On 14/08/2017 at 7:07 AM, Mike Rockett said:

Hi Peter,

From the top of my head, you could potentially use mapping collections to make it language aware; however, that means importing the entire dataset and using multiple languages - one collection for each language. How are your other URIs being handled?

Hi Mike

each language is handled by a folder named after the language

domain.com/fr/ 
domain.com/de/ 
domain.com/it/ 
domain.com/es/ 

 

Share this post


Link to post
Share on other sites
9 hours ago, Peter Knight said:

Hi Mike

each language is handled by a folder named after the language

domain.com/fr/ 
domain.com/de/ 
domain.com/it/ 
domain.com/es/ 

 

You're probably going to need to do it manually. As Jumplinks 1 is not multi-lang-aware, there's no way for the destination field to know which language you need, unless you declare it manually, or by means of a mapping collection, one for each language. Destination selectors won't help as they are also not aware of languages.

So your collection could be called "italian", and would contain this:

100=/it/uri/to/page
101=/it/uri/to/other/page
102=/it/uri/to/product

And then define the language jumplink:

Source: it/{all}/{id}
Destination {id|italian}

This assumes that your ids are all different between content types (like product, etc.). You would also need to build your collections via a script, and that would require each destination page having a field with the old ID.

Share this post


Link to post
Share on other sites

Hi,

I've searched for a long time, but could not find an answer:

We relaunched a old website with a URL structure like that:

http://www.example.com/?main=notice	
http://www.example.com/?main=contact	
http://www.example.com/?main=film	
http://www.example.com/?main=references	
http://www.example.com/?main=products&sub=sunb

 Is it possible to redirect this old links via Jumplinks? I tiedy to define "?main=notice" as source but this don't work - I get the homepage with the original parameter attached ;-(.

Can you please give me a hint, many greets, Jens alias DV-JF

Share this post


Link to post
Share on other sites
3 hours ago, DV-JF said:

Hi,

I've searched for a long time, but could not find an answer:

We relaunched a old website with a URL structure like that:


http://www.example.com/?main=notice	
http://www.example.com/?main=contact	
http://www.example.com/?main=film	
http://www.example.com/?main=references	
http://www.example.com/?main=products&sub=sunb

 Is it possible to redirect this old links via Jumplinks? I tiedy to define "?main=notice" as source but this don't work - I get the homepage with the original parameter attached ;-(.

Can you please give me a hint, many greets, Jens alias DV-JF

Hi,

It is discussed somewhere in this thread. The problem is that a request like that is a request to the home page, and so the 404 event will not be triggered, and so Jumplinks cannot intervene and do the redirect.

You will need to use .htaccess to redirect all of those requests to something that Jumplinks can handle. Unfortunately, this will result in two redirects every time, but it's something you would need to work with in order to use Jumplinks.

In your .htaccess file, add the following on line 99 (just below AddDefaultCharset):

RewriteCond %{QUERY_STRING} ^main=(.+)$ [NC]
RewriteRule ^$ /rq [R=302]

When you request example.com/?main=something, it will be redirected to example.com/rq?main=something, and then you can create a jumplink for it.

  • Thanks 1

Share this post


Link to post
Share on other sites

I don't seem to get it to redirect at all. Or maybe I don't get it right? Is this module compatible with processwire 3.0 with multiple languages enabled?

My source (old url) is: 

Quote

de/foobar

My destination is a selected page that exists.

If I call https://mydomain.com/de/foobar I just get a 404 instead of the page I'm looking to redirect to.

Share this post


Link to post
Share on other sites
On 9/4/2017 at 11:40 AM, DarsVaeda said:

I don't seem to get it to redirect at all. Or maybe I don't get it right? Is this module compatible with processwire 3.0 with multiple languages enabled?

My source (old url) is: 

My destination is a selected page that exists.

If I call https://mydomain.com/de/foobar I just get a 404 instead of the page I'm looking to redirect to.

Jumplinks is compatible with v3 (though not thoroughly tested). As for multi-language, it is not specifically supported in terms of the additional features. However, a 404 event would still trigger the jumplinks routine. Please enable debug mode in Jumplinks' config and paste that log here. If it's very long, please add as an attachment.

Share this post


Link to post
Share on other sites

It's strange. I guess this has nothing to do with jumplinks.

https://mydomain.com/de/existing-page/non-existing -> 404 -> I get the jumplink debug page

https://mydomain.com/de/non-existing -> I just get the root page

 

@edit: aahhh I found it! URL Segements was turned on but not handled. So everything not existing was just redirected to frontpage.

  • Like 1

Share this post


Link to post
Share on other sites

I have a big problem. I installed Jumplinks and know my css, js and images don´t load anymore. I installed Processwire to a subdomain and now they redirect every request to the main domain. So no image can be found.

How can I solve it quickly? A uninstall didn´t work.

 

//Was a different problem and not related to the module.

Share this post


Link to post
Share on other sites
3 hours ago, jannisl said:

I have a big problem. I installed Jumplinks and know my css, js and images don´t load anymore. I installed Processwire to a subdomain and now they redirect every request to the main domain. So no image can be found.

How can I solve it quickly? A uninstall didn´t work.

Not sure how that’s possible, but it could be related to caching. If you provide more information about your setup and what jumplinks you have created, I might be able to assist.

1 hour ago, ceberlin said:

Hi Mike, is there a release plan for the v.2 version?

It’s on ice at the moment due to new work that’s come in. Time is super limited until earlyish next year, at which point I can revisit v2. Sorry for the delays, but it’s unavoidable at the moment.

  • Like 1

Share this post


Link to post
Share on other sites

Hey guys,

the jumplinks from "www.domain.com/index.php/something/" doesn´t get redirected to "www.domain.com/something/" and this is the reason why I can´t create Jumplinks for links with "index.php/" inside.

Did I understand something wrong?

Thanks,
jannisl

Share this post


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


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By horst
      Wire Mail SMTP

      An extension to the new WireMail base class that uses SMTP-transport

      This module integrates EmailMessage, SMTP and SASL php-libraries from Manuel Lemos into ProcessWire. I use this continously evolved libraries for about 10 years now and there was never a reason or occasion not to do so. I use it nearly every day in my office for automated composing and sending personalized messages with attachments, requests for Disposition Notifications, etc. Also I have used it for sending personalized Bulkmails many times.

      The WireMailSmtp module extends the new email-related WireMail base class introduced in ProcessWire 2.4.1 (while this writing, the dev-branch only).
       
      Here are Ryans announcement.



      Current Version 0.3.0
      get it from the Modules Directory Install and Configure

      Download the module into your site/modules/ directory and install it.

      In the config page you fill in settings for the SMTP server and optionaly the (default) sender, like email address, name and signature.
      You can test the smtp settings directly there. If it says "SUCCESS! SMTP settings appear to work correctly." you are ready to start using it in templates, modules or bootstrap scripts.


      Usage Examples
      The simplest way to use it:
      $numSent = wireMail($to, $from, $subject, $textBody); $numSent = wireMail($to, '', $subject, $textBody); // or with a default sender emailaddress on config page This will send a plain text message to each recipient.
       
      You may also use the object oriented style:
      $mail = wireMail(); // calling an empty wireMail() returns a wireMail object $mail->to($toEmail, $toName); $mail->from = $yourEmailaddress; // if you don't have set a default sender in config // or if you want to override that $mail->subject($subject); $mail->body($textBody); $numSent = $mail->send(); Or chained, like everywhere in ProcessWire:
      $mail = wireMail(); $numSent = $mail->to($toEmail)->subject($subject)->body($textBody)->send(); Additionaly to the basics there are more options available with WireMailSmtp. The main difference compared to the WireMail BaseClass is the sendSingle option. With it you can set only one To-Recipient but additional CC-Recipients.
      $mail = wireMail(); $mail->sendSingle(true)->to($toEmail, $toName)->cc(array('person1@example.com', 'person2@example.com', 'person3@example.com')); $numSent = $mail->subject($subject)->body($textBody)->send(); The same as function call with options array:
      $options = array( 'sendSingle' => true, 'cc' => array('person1@example.com', 'person2@example.com', 'person3@example.com') ); $numSent = wireMail($to, '', $subject, $textBody, $options); There are methods to your disposal to check if you have the right WireMail-Class and if the SMTP-settings are working:
      $mail = wireMail(); if($mail->className != 'WireMailSmtp') { // Uups, wrong WireMail-Class: do something to inform the user and quit echo "<p>Couldn't get the right WireMail-Module (WireMailSmtp). found: {$mail->className}</p>"; return; } if(!$mail->testConnection()) { // Connection not working: echo "<p>Couldn't connect to the SMTP server. Please check the {$mail->className} modules config settings!</p>"; return; } Following are a ...


      List of all options and features


      testConnection () - returns true on success, false on failures


      sendSingle ( true | false ) - default is false

      sendBulk ( true | false ) - default is false, Set this to true if you have lots of recipients (50+)


      to ($recipients) - one emailaddress or array with multiple emailaddresses

      cc ($recipients) - only available with mode sendSingle, one emailaddress or array with multiple emailaddresses

      bcc ($recipients) - one emailaddress or array with multiple emailaddresses

       
      from = 'person@example.com' - emailaddress, can be set in module config (called Sender Emailaddress) but it can be overwritten here

      fromName = 'Name Surname' - optional, can be set in module config (called Sender Name) but it can be overwritten here


      priority (3) - 1 = Highest | 2 = High | 3 = Normal | 4 = Low | 5 = Lowest

      dispositionNotification () or notification () - request a Disposition Notification


      subject ($subject) - subject of the message

      body ($textBody) - use this one alone to create and send plainText emailmessages

      bodyHTML ($htmlBody) - use this to create a Multipart Alternative Emailmessage (containing a HTML-Part and a Plaintext-Part as fallback)

      addSignature ( true | false ) - the default-behave is selectable in config screen, this can be overridden here
      (only available if a signature is defined in the config screen)

      attachment ($filename, $alternativeBasename = "") - add attachment file, optionally alternative basename


      send () - send the message(s) and return number of successful sent messages


      getResult () - returns a dump (array) with all recipients (to, cc, bcc) and settings you have selected with the message, the message subject and body, and lists of successfull addresses and failed addresses,


      logActivity ($logmessage) - you may log success if you want

      logError ($logmessage) - you may log warnings, too. - Errors are logged automaticaly
       
       
      useSentLog (true | false) - intended for usage with e.g. third party newsletter modules - tells the send() method to make usage of the sentLog-methods - the following three sentLog methods are hookable, e.g. if you don't want log into files you may provide your own storage, or add additional functionality here

      sentLogReset ()  - starts a new LogSession - Best usage would be interactively once when setting up a new Newsletter

      sentLogGet ()  - is called automaticly within the send() method - returns an array containing all previously used emailaddresses

      sentLogAdd ($emailaddress)  - is called automaticly within the send() method
       
      Changelog: https://github.com/horst-n/WireMailSmtp/blob/master/CHANGELOG.md
       
    • By Robin S
      An experimental module for adding images to a field via pasting one or more URLs.
      Add Image URLs
      Allows images to be added to an images field by pasting URLs.

      Usage
      Install the Add Image URLs module.
      A "Paste URLs" button will be added to all image fields. Use the button to show a textarea where image URLs may be pasted, one per line. Images are added when the page is saved.
       
      https://github.com/Toutouwai/AddImageUrls
    • By netcarver
      This module provides a very simple interface to a set of named counters. You simply call a single function, next('name'), to pull the next value out of a counter - or to set it up if it does not yet exist. Next() takes a few extra parameters to allow you to increment by values other than 1 or to start at a certain number.
      This provides some similar functionality to the built-in page naming feature of PW, and to this module recently posted by Stikki but I think it offers a little more flexibility than either. Having said that, I do like the simplicity of Stikki's new auto-increment module.
      Module Availability
      Here is my module on Github.
      Here it is in the module repository.
      Example Usage
      Here's how this module can be used to title and name a new page by adding a couple of simple hooks to site/ready.php. This example applies to new pages using a template called 'invoice' that can be quick-added to the page tree. In order to get the following to work, you must edit the template that will be the parent of the 'invoice' template and setup the template for children to "invoice" and set the "Name Format for Children" field to something other than the default blank value (I use  title  as my value.)
      <?php /** * Function to recognise our special template. */ function isInvoiceTemplate($template) { return ($template == 'invoice'); } /** * Pre-load the page title for invoice pages with a unique value * which includes a counter component. */ $pages->addHookBefore("Pages::setupNew", function($event) { $page = $event->arguments(0); $is_invoice = isInvoiceTemplate($page->template); $no_inv_num = $page->title == ''; if ($is_invoice && $no_inv_num) { $counter_name = 'WR-' . date('Y'); $number = $this->modules->get('DatabaseCounters')->next($counter_name, 10, 5000); $page->title = $counter_name . '-' . sprintf("%06u", $number); } }); /** * Prevent ProcessPageEdit from forcing an edit of the name if we got here * through a quickAdd from ProcessPageAdd. We can do this because we * preset the title field in the Pages::setupNew hook. */ $pages->addHookAfter("ProcessPageEdit::loadPage", function($event) { $page = $event->return; $is_invoice = isInvoiceTemplate($page->template); $is_temp = $page->hasStatus(Page::statusTemp); if ($is_invoice && $is_temp) { $page->removeStatus(Page::statusTemp); $event->return = $page; } }); Note, the above code + module is one direct solution to the problem posted here by RyanJ.


      Version History
      1.0.0 The initial release.
    • By flydev
      PulsewayPush
      Send "push" from ProcessWire to Pulseway.
       
      Description
      PulsewayPush simply send a push to a Pulseway instance. If you are using this module, you probably installed Pulseway on your mobile device: you will receive notification on your mobile.
      To get more information about Pulseway, please visit their website.
      Note
      They have a free plan which include 10 notifications (push) each day.
       
      Usage
      Install the PulsewayPush module.
      Then call the module where you like in your module/template code :
      <?php $modules->get("PulsewayPush")->push("The title", "The notification message.", "elevated"); ?>  
      Hookable function
      ___push() ___notify() (the two function do the same thing)
       
      Download
      Github:  https://github.com/flydev-fr/PulsewayPush Modules Directory: https://modules.processwire.com/modules/pulseway-push/  
      Examples of use case
      I needed for our work a system which send notification to mobile device in case of a client request immediate support. Pulseway was choosen because it is already used to monitor our infrastructure.
      An idea, you could use the free plan to monitor your blog or website regarding the number of failed logins attempts (hooking Login/Register?), the automated tool then block the attacker's IP with firewall rules and send you a notification.
       

       
      - - -
      2017-11-22: added the module to the modules directory
       
    • By cosmicsafari
      Hi all,
      Just wondering if its possible to just add some basic output to my modules config page.
      I was wanting to output a bulleted list of some information which I will be pulling from a third party.
      Retrieving the data is fine i'm just not sure how to output it to the config page?
      From what I can see in the link below, it only seems like you can append form items to the page.
      https://processwire.com/blog/posts/new-module-configuration-options/