Jump to content

Recommended Posts

@Mike Rockett - I am seeing entries appearing the on the 404 Monitor tab that are actually being properly handled and redirected by PagePathHistory. I am wondering if it's a matter of adjusting the load priority for the Jumplinks module relative to PagePathHistory, or if there is more to fixing this, but it would be great if they weren't being recorded. Any thoughts? Thanks!

Share this post


Link to post
Share on other sites

@Mike Rockett, sorry to bother you with this again, but with version 1.5.56 of Jumplinks we're still seeing quite a few database errors:

Quote

String data, right truncated: 1406 Data too long for column 'request_uri' at row 1 (in /site/assets/cache/FileCompiler/site/modules/ProcessJumplinks/ProcessJumplinks.module.php line 532)

Looking at the database the column is now varchar(512), but it seems that's just not enough.

On a related note: on this site "Log 404 hits to the database" isn't checked, so I'm wondering why this is still happening? This is unrelated to the database issue above, but it also seems that there might be some unnecessary / unexpected process going on in here 🙂

Share this post


Link to post
Share on other sites

not sure if this was reported already, but i'm unable to upgrade past 1.5.54, upgrading from 1.5.54 => 1.5.57 creates a "Failed to init module" error, SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'last_hit'. Hope this helps, not sure what the issue is.

Share this post


Link to post
Share on other sites
On 11/8/2019 at 4:36 PM, Ben Sayers said:

Hi @kongondo, no problem at all! I'm just happy to have your support 😃 - I'll stay tuned, thanks!!

@Ben Sayers,

I hope you can forgive my 'ineptitude'. I have been royally swamped.

I tried to install Jumplinks but was inundated with the errors reported by others above, so I gave up on that. Anyway, that was just for testing redirects. My solution below, since Jumplinks isn't working for me (I tried all the way back to version 1.5.50), is to use ProcessWire session redirects. I don't know what that means for you in respect of SEO. I hope I am not polluting Jumplinks' support forum but I need to offer a bit of an explanation.

The template blog-posts has URL segments enabled. If you visit:

domain.tld/blog/posts/an-existing-post/

ProcessWire successfully resolves that since 'an-existing-post' exists. In other words, 'an-existing-post' is not considered a URL segment.

If you visit:

domain.tld/blog/posts/non-existent-post/

the URL does not resolve to an existing post. ProcessWire knows that and considers 'non-existing-post' to be a URL Segment. However, since we have URL segments enabled in blog-posts, ProcessWire lets us deal with the situation. We do this in blog-posts template file. I don't know how Jumplinks works but I assume if we threw a 404 error, it will pick up on that and redirect to our desired URI. Again, I am just guessing here. However, since Jumplinks did not work for me, I suggest the following (session redirect), even as a temporary measure. You can try the 404 option to see if it works. Please report back, thanks.

At the top of your blog-posts template file, insert the following, just above your first include:

if($input->urlSegment1) {
	// @todo: test this with Jumplinks. In that case, comment out "session" code below
    //throw new Wire404Exception();
	// redirect to main blog page. if using this, comment out 404 exception code above
    $session->redirect('/blog/');
}
	
include('./_head.php'); // include header markup

I hope this helps. Apologies again for the delay.

Edited by kongondo

Share this post


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

I hope you can forgive my 'ineptitude'. I have been royally swamped.

Not a problem at all @kongondo, I know how it goes 😃

Quote

At the top of your blog-posts template file, insert the following, just above your first include:


if($input->urlSegment1) {
	// @todo: test this with Jumplinks. In that case, comment out "session" code below
    throw new Wire404Exception();
	// redirect to main blog page. if using this, comment out 404 exception code above
    // $session->redirect('/blog/');
}

I used the first option with Jumplinks and it WORKS!! Hallelujah, thank you so much for your time.

  • Like 1

Share this post


Link to post
Share on other sites
6 minutes ago, Ben Sayers said:

I used the first option with Jumplinks and it WORKS!!

Great! I am glad it got resolved!

Share this post


Link to post
Share on other sites

Hi guys,

Super sorry for not getting back to you – much like @kongondo, royally swamped (this time of year).

First off, I'm battling to understand why folks are having install/upgrade troubles here. Whilst JL1 doesn't use a full-on DB migration strategy, it does have an iterative cycle. If you're on schema v4 and upgrade to the latest version, it should be doing v5 and then v6. Only thing I can think of then is that the schema version got messed up somehow. It gets saved in the module’s config, so I really don't see what could have messed it up (I recently formatted those files, but naturally that should not make a difference). I'd need to try reproduce this to see what might be going on. As an aside, JL2 will use DB migrations, so this issue would less likely be encountered unless the applicable tracking table was truncated. Hoping to get JL2 wrapped up over the holidays (lots of leave-days, no big plans).

@adrian – I see PagePathHistory doesn't set its own priority, and JL does. I recall doing this for a reason, but given what you've said, perhaps JL should be somehow setup to be the 'last resort'?

@teppo – Given the schema errors that are being experienced, I think that for the time being, I'm going to simply truncate the string that gets stored to 512 characters. Also a little confused by the 404 logger – it really should not be doing anything if turned off. I do see that it only logs the 404 if there are no jumplinks – I'll definitely fix up that part. 

Update: I've pushed out 1.5.58 - please let me know if the DB errors stop. Thanks!

 

  • Like 1

Share this post


Link to post
Share on other sites
46 minutes ago, Mike Rockett said:

 I see PagePathHistory doesn't set its own priority, and JL does. I recall doing this for a reason, but given what you've said, perhaps JL should be somehow setup to be the 'last resort'?

Yeah, it's the priority setting, but also you use addHookBefore and PagePathHistory used AddHook (alias of AddHookAfter) so to get it to not log a 404 for those URLs handled by PPH, I changed Jumplinks to use addHookAfter and set the priority to 1000 - remember that 100 is the default.

Any thoughts on committing these changes to JL?

Thanks,
Adrian

Share this post


Link to post
Share on other sites

@adrian – I'd be happy to. I see from a previous discussion with Teppo that the priority was set due to a conflict with sitemaps. That being said, I do believe there is a measure in place to circumvent sitemap.xml URIs from being logged, so as a result, I don't see why we can't change the hook and priority. At the end of the day, it kinda makes sense. Modules that need to do things with 404 events should be given the opportunity to do so before JL comes in as a last resort. So I'm going to go ahead and do this – if anyone encounters any issues, we'll need to deal with them on an as-and-when basis.

  • Like 1

Share this post


Link to post
Share on other sites
Just now, Mike Rockett said:

Have release 1.5.59 with these changes. 🙂

Thanks - awesome, except I am getting this error when updating via PW's Upgrade module.

"File could not be downloaded (https://gitlab.com/rockettpw/seo/jumplinks-one/-/archive/1.5.59/jumplinks-one-1.5.59.zip) 404 Not Found: (tried: curl)"

Any reason you can think of?

Share this post


Link to post
Share on other sites
1 minute ago, adrian said:

Any reason you can think of?

Note to self: When creating tags, be sure to actually click on "Create Tag" 🤣

Please try again 🙂

  • Like 1

Share this post


Link to post
Share on other sites

I keep getting this error:

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

Any ideas how to fix this?

thanks

Share this post


Link to post
Share on other sites

OK, already fixed it.

I dropped the column from the database

Then I also had to drop the whole process_jumplinks_nf table and now the error is gone

Share this post


Link to post
Share on other sites

@OllieMackJames - hmm, something weird is going on here as this is not the first time this has come up (I don't think)... I wonder if it's something related to the module config. The schema version is set there, and it will iterate through the schema updates until it matches the current version. That particular column is way back in schema v3, which is why I think there might be a config issue going on here... Was this a new install or an upgrade?

  • Like 1

Share this post


Link to post
Share on other sites
On 12/3/2019 at 7:50 PM, Mike Rockett said:

@OllieMackJames - hmm, something weird is going on here as this is not the first time this has come up (I don't think)... I wonder if it's something related to the module config. The schema version is set there, and it will iterate through the schema updates until it matches the current version. That particular column is way back in schema v3, which is why I think there might be a config issue going on here... Was this a new install or an upgrade?

@Mike Rockett it was an upgrade, been using this great module for years already, thanks

Share this post


Link to post
Share on other sites

@OllieMackJames Okay, well I honestly don't think there's much more I can do here (unless I'm missing something staring at me in the face 🙈). Hoping to find time soon to continue work on v2 (starting writing the frontend a little while back), which will keep track of these things a little differently (a migration table). 

8 hours ago, OllieMackJames said:

been using this great module for years already, thanks

Scary to think how long it's been around, and how long I've taken to get v2 anywhere 🙃

  • 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 gebeer
      I am happy to present my new fieldtype FieldtypeImageFromPage. It is made up of 2 modules:
      Fieldtype Image Reference From Another Page is a Fieldtype that stores a reference to a single image from another page. The image can be selected with the associated Inputfield.
      Inputfield Select Image From Page is an Inputfield to select a single image from images on a predefined page and it's children.
      And there also is a helper module that takes care of cleanup tasks.
      This module evolved out of a discussion about my other Module FieldtypeImagePicker.  It caters for use cases where a set of images is being reused multiple times across a site. With this fieldtype these images can be administered through a chosen page. All images uploaded to that page will be available in the inputfield.
      When to use ?
      Let editors choose an image from a set of images that is being used site-wide. Ideal for images that are being re-used across the site.
      Suited for images that are used on multiple pages throughout the site (e.g. icons).
      Other than the native ProcessWire images field, the images here are not stored per page. Only references to images on another page are stored. This has several advantages:
      one central place to organize images when images change, you only have to update them in one place. All references will be updated, too. (Provided the name of the image that has changed stays the same) Features
      Images can be manipulated like native ProcessWire images (resizing, cropping etc.) Image names are fully searchable through the API Accidental image deletion is prevented. When you want to delete an image from one of the pages that hold your site-wide images, the module searches all pages that use that image. If any page contains a reference to the image you are trying to delete, deletion will be prevented. You will get an error message to help you edit those pages and remove references there before you can finally delete the image. How to install and setup
      Download and install this module like any other modules in ProcessWire Create a page in the page tree that will hold your images. This page's template must have an images field Upload some images to the page you created in step 2 Create a new field. As type choose 'Image Reference From Another Page'. Save the field. In 'Details' Tab of the field choose the page you created in step 2 Click Save button Choose the images field name for the field that holds your images (on page template from step 2) Click Save button again Choose whether you want to include child pages of page from step 2 to supply images Add the field to any template You are now ready to use the field View of the inputfield on the page edit screen:

      View of the field settings

      The module can be installed from this github repo. Some more info in the README there, too.
      In my tests it was fairly stable. After receiving your valued feedback, I will eventually add it to the modules directory.
      My ideas for further improvement:
      - add ajax loading of thumbnails
      Happy to hear your feedback!
       
    • By gebeer
      Although the PW backend is really intuitive, ever so often my clients need some assistance. Be it they are not so tech savvy or they are not working in the backend often.
      For those cases it is nice to make some help videos available to editors. This is what this module does.
      ProcessHelpVideos Module
      A Process module to display help videos for the ProcessWire CMS. It can be used to make help videos (screencasts) available to content editors.
      This module adds a 'Help Videos" section to the ProcessWire backend. The help videos are accessible through an automatically created page in the Admin page tree. You can add your help videos as pages in the page tree. The module adds a hidden page to the page tree that acts as parent page for the help video pages. All necessary fields and templates will be installed automatically. If there are already a CKEditor field and/or a file field for mp4 files installed in the system, the module will use those. Otherwise it will create the necessary fields. Also the necessary templates for the parent help videos page and it's children are created on module install. The module installs a permission process-helpvideos. Every user role that should have access to the help video section, needs this permission. I use the help video approach on quite a few production sites. It is stable so far and well received by site owners/editors. Up until now I installed required fields, templates and pages manually and then added the module. Now I added all this logic to the install method of the module and it should be ready to share.
      The module and further description on how to use it is available on github: https://github.com/gebeer/ProcessHelpVideos
      If you like to give it a try, I am happy to receive your comments/suggestions here.
    • By Robin S
      A module created in response to the topic here:
      Page List Select Multiple Quickly
      Modifies PageListSelectMultiple to allow you to select multiple pages without the tree closing every time you select a page.
      The screencast says it all:

       
      https://github.com/Toutouwai/PageListSelectMultipleQuickly
      https://modules.processwire.com/modules/page-list-select-multiple-quickly/
    • By gebeer
      Hello all,
      sharing my new module FieldtypeImagePicker. It provides a configurable input field for choosing any type of image from a predefined folder.
      The need for it came up because a client had a custom SVG icon set and I wanted the editors to be able to choose an icon in the page editor.
      It can also be used to offer a choice of images that are used site-wide without having to upload them to individual pages.
      There are no image manipulation methods like with the native PW image field.
      Module and full description can be found on github https://github.com/gebeer/FieldtypeImagePicker
      Kudos to @Martijn Geerts. I used his module FieldTypeSelectFile as a base to build upon.
      Here's how the input field looks like in the page editor:

      Hope it can be of use to someone.
      If you like to give it a try, I'm happy to hear your comments or suggestions for improvement. Eventually this will go in the module directory soon, too.
    • By bernhard
      @Sergio asked about the pdf creation process in the showcase thread about my 360° feedback/survey tool and so I went ahead and set my little pdf helper module to public.
      Description from PW Weekly:
       
      Modules Directory: https://modules.processwire.com/modules/rock-pdf/
      Download & Docs: https://github.com/BernhardBaumrock/RockPDF
       
      You can combine it easily with RockReplacer: 
      See also a little showcase of the RockPdf module in this thread:
       
×
×
  • Create New...