Jump to content

Jumplinks


Mike Rockett

Recommended Posts

  • 1 month later...

@Mike Rockett

I'm getting an error on an install as follows:
 

  Quote

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

Expand  

It only affects the admin/back-end but wondered if there was a sensible way to fix?

The only change I made recently to the Module was to stop logging 404 errors and possibly an upgrade of the Module too.

Many thanks

 

 

Link to comment
Share on other sites

@Peter Knight - That's odd, I was quite sure this bug was fixed. Internally, the module stores a schema version and then it does a comparison to see if an update is required. So if it is adding this column again, it means the stored schema version went out of sync. Could you check the database to see what the _schemaVersion is set to? Not sure which table it is, but it should be relatively simple to find.

Link to comment
Share on other sites

  • 3 months later...

Hi @Mike Rockett - I know you're not around much these days, but I just had this exception:

image.png.5a6d5bab073ca773560188c5bf25cd73.png

Obviously that's a weird request for mysite.com/? but it would still be nice if this was handled better. Not sure if you want to change the request_uri field to utf8mb4 so it can store these, or if you want to sanitize it somehow?

Let me know if you need more details.

Thanks.

Link to comment
Share on other sites

  • 1 year later...
  On 10/15/2021 at 3:33 PM, Mike Rockett said:

@Peter Knight - That's odd, I was quite sure this bug was fixed. Internally, the module stores a schema version and then it does a comparison to see if an update is required. So if it is adding this column again, it means the stored schema version went out of sync. Could you check the database to see what the _schemaVersion is set to? Not sure which table it is, but it should be relatively simple to find.

Expand  

Hi @Mike Rockett

My SchemaVersion is set to 4

{"schemaVersion":4,"wildcardCleaning":"fullClean","enhancedWildcardCleaning":"","legacyDomain":"","statusCodes":"200 301 302","enable404Monitor":"","moduleDebug":"","redirectsImported":true,"moduleDisable":"","_schemaVersion":2}

 

Link to comment
Share on other sites

  • 9 months later...

PHP 8.2 Deprecated Warnings

Hey when using with PHP 8.2.6 I get some warnings:

25× 	
PHP Deprecated: htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated in .../modules/ProcessJumplinks/ProcessJumplinks.module.php:1131

13× 	
PHP Deprecated: htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated in .../modules/ProcessJumplinks/ProcessJumplinks.module.php:1130

1× 	
PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in .../modules/ProcessJumplinks/Classes/ParseUserAgent.php:169

1203508002_2023-11-2109_02_32-JumplinksProcessWirework-different.vieregg.designMozillaFirefox.thumb.png.45da971ed76bba6d32ba56593ff1a86c.png

Any chance that you could @Mike Rockett update the module?

Cheers Jens alias DV-JF

Link to comment
Share on other sites

Hi @Mike Rockett - brand new issue with the latest version: 

PHP Deprecated: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated in ProcessJumplinks.module.php:206

EDIT: I see that line hasn't changed recently, but I've never seen the error before on the same server with no recent PHP upgrades. Regardless, it still needs a fix please and thanks.

Link to comment
Share on other sites

@Mike Rockett - sorry, I should have come with more details - looks like it's happening from a cron executed PHP script that bootstraps PW. That would explain why it's null.

I'm not sure why it's a new error though - on a quick scan I can't see anything from your most recent commit that would cause this change.

Link to comment
Share on other sites

  On 11/30/2023 at 10:05 AM, Mike Rockett said:

The only thing I can think of is an upgrade to PHP 8.1, as that's the only thing that can cause it.

Expand  

That would make sense, except I have been running 8.2 on that server for many months and the error started appearing immediately after updating Jumplinks from 1.5.61 to 1.5.63.

  On 11/30/2023 at 10:09 AM, Mike Rockett said:

Guessing this should do the trick…?

Expand  

Yep, that should work just fine.

Just a little FYI about something I have noticed in the past - sometimes $_SERVER['REQUEST_URI'] returns false rather than the URL or NULL (https://github.com/nette/tracy/issues/351) which means checks need to consider that. Obviously not relevant given your CLI check.

PS - thanks so much for continuing to support your modules even though you're no longer using PW - very generous indeed.

Link to comment
Share on other sites

  On 11/30/2023 at 11:12 AM, Mike Rockett said:

@adrian – I've released 1.5.64 which adds the safety net around CLI usage (as a general rule) and request_uri. Please let me know if that solves it.

Expand  

Thanks - that has taken care of things. I actually think there are lots of modules that get loaded via CLI scripts even though they aren't needed. I kinda think PW should have a module autoload option for this to make it easier / more obvious to the developer to disable via CLI unless needed.

  • Like 4
Link to comment
Share on other sites

  • 1 year later...

Hi @Mike Rockett!
I Just noticed, that you are unfortunately no longer really active here.

3 weeks ago I created an issue after using your valuable module and having issues with encoded special characters:
https://gitlab.com/rockettpw/seo/jumplinks-one/-/issues/5

Is there perhaps a chance that you could take a look at it?

Thanks in advance! 🙏👋

Link to comment
Share on other sites

Not 100% sure but isn't this the default behaviour of browsers or maybe even the web server to encode umlauts/special characters?

I know we can enable them in ProcessWire itself and use them in page names but not sure this would change the behaviour in Jumplinks as well.

For the time being you could at these to the redirects. How often do you experience these kind of URLs?

Link to comment
Share on other sites

Hey @wbmnfktr, thx for taking the time!

  On 3/1/2025 at 9:46 PM, wbmnfktr said:

Not 100% sure but isn't this the default behaviour of browsers or maybe even the web server to encode umlauts/special characters?
I know we can enable them in ProcessWire itself and use them in page names but not sure this would change the behaviour in Jumplinks as well.

Expand  

I think that's the default behaviour of browsers, too.
Non ascii characters (like special characters) that are not substituted in ProcessWire are URL encoded by the browser and used for requests.
So in Jumplinks broken links should be recognized and redirected as URL encoded Links (under the hood).
But unfortunately this does not work:

In 404-Monitor links are recognized with URL-Encoded special characters:

news/2020-06-26-ich-war-schon-angekommen-bevor-ich-%c3%bcberhaupt-da-war

(Better for reading would be the unencoded version, if possible.)

When adopting the 404 by click on the corresponding „Request URI“, the URI is shown and saved unencoded in the next step under „Register New Jumplink“.

news/2020-06-26-ich-war-schon-angekommen-bevor-ich-überhaupt-da-war

These unencoded redirects (created via 404-Monitor) are not working.
If manually changed to encoded version it works.

  On 3/1/2025 at 9:46 PM, wbmnfktr said:

How often do you experience these kind of URLs?

Expand  

On one website a lot. Lot's of news pages with pagetitles (= pagenames) having special characters. Coming from a CMS that allows nearly all special characters that are allowed in the web nowadays.

  On 3/1/2025 at 9:46 PM, wbmnfktr said:

For the time being you could at these to the redirects.

Expand  

Adding this manually would be really time consuming and error-prone.

I assume fixing this should not take that long for a Pro.
The most important thing is to preserve the right URL when adopting it from the 404-Monitor.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for raising this, however I'm not maintaining Jumplinks anymore. It has been up for grabs for a while now, and nobody has expressed an interest in taking it over. I would consider the module archived at this point. I am open to a merge request to resolve any lingering issues, but am not prepared to spend development time on the module.

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