Jump to content

Jumplinks


Mike Rockett

Recommended Posts

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.

Link to comment
Share on other sites

  • 3 weeks later...

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

 

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

Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

  • 3 weeks later...

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.

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

Link to comment
Share on other sites

  • 2 weeks later...

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?
 

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

Link to comment
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/ 

 

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

Link to comment
Share on other sites

  • 3 weeks later...

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

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

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

Link to comment
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
Link to comment
Share on other sites

  • 3 months later...

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.

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...