Jump to content

Recommended Posts

57 minutes ago, Mike Rockett said:

@teppo - in regards to Jumplinks 2 and composer support: the module utilises several composer packages, which at present are kept in the vendor directory of the module, part of source control. Just to be 100% sure, if I were to drop this from source control, this would force users to install via composer? If so, I'd need to leave it in there, unless you know of another way 🙂

45 minutes ago, Mike Rockett said:

@wbmnfktr - Hence why I'm needing some more info – not sure if any additional composer support has been added. Would be great if I could trigger an install during module install from the UI. 🙂

Sorry, I've got nothing for this. At this point my suggestion would be to keep those packages in the repository. It's the only way that works seamlessly with the module installer in Admin, and I believe it makes more sense for your module than any of the alternatives I can think of. Anything else would reduce your potential user base significantly.

I've gone the other way with some of my projects, but those have mainly been site profiles, so the context is quite different. While I agree that a native Composer installation integration could be nice, we're not quite there yet — at this point requiring Composer may make sense for hard-core developer-oriented projects, not much else.

57 minutes ago, Mike Rockett said:

On the topic of dependencies, I'm feeling inclined to push the minimum PHP version to the one that still has active security support, which at this point is PHP 7.1.

Go for it! I've been putting out PHP 7.1+ content for a while now, and so far no complaints.

It's perhaps worth noting that PHP 7.1 is well on its way to being obsolete as well: it's already past the active support phase, and in just over two months it will stop receiving security updates. While certain organisations may backport security fixes for 7.1 for a while after that, officially its really close to the end of its lifespan. Folks should be already using (or at the very least actively updating to) 7.2 – or preferably 7.3 🙂

56 minutes ago, Mike Rockett said:

I'd also like to drop support for ProcessWire 2.8. Any objections?

Again: go for it 🙂

I don't think that this will affect a particularly large portion of users (last time I polled this was in 2017, but even back then ~55% of those responding were already on 3.0), 2.8 itself hasn't been updated for almost three years now, and users of legacy versions can always keep using one of the solutions that work for said legacy setups.

Share this post


Link to post
Share on other sites
5 minutes ago, teppo said:

Sorry, I've got nothing for this. At this point my suggestion would be to keep those packages in the repository. It's the only way that works seamlessly with the module installer in Admin, and I believe it makes more sense for your module than any of the alternatives I can think of. Anything else would reduce your potential user base significantly.

Ah ok, thanks for the clarification there. Guess the optimist in me was hanging around 🙂

6 minutes ago, teppo said:

Go for it! I've been putting out PHP 7.1+ content for a while now, and so far no complaints.

Good to know - thanks!

Share this post


Link to post
Share on other sites
On 9/15/2019 at 12:07 PM, Mike Rockett said:

These columns are sorted in 1.5.56. However, instead of text, I've gone with varchar(512), which should be more than long enough. 🙂

Thanks for this Mike. 

Not sure if 512 is long enough. There isn't any limitations for user agent length (other than server limit for headers) and if request_uri means uri that user were redirected - then few pointers for uri lengths:

Quote

The HTTP protocol does not place any a priori limit on the length of a URI

and 

Quote

Extremely long URLs are usually a mistake. URLs over 2,000 characters will not work in the most popular web browsers. 

https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers

So if you want to limit these at the database level, then you should clip values also to that length.

Share this post


Link to post
Share on other sites

Hello, I'm having a really strange issue with this plugin. I using the latest version of PW and all modules. I have a blog (using ProcessBlog & MarkupBlog) and removed a bunch of old posts, I wanted to redirect them to the main blog page (domain.com/blog/). For whatever reason, if I try to register a new jumplink and it has "blog/" in the source (domain.com/blog/some-post/), the redirect doesn't work. I thought maybe I had a problem with one of the existing blog post redirects, so I removed all jumplinks with "blog/" in them and it's still happening. I've tried disabling my other modules, installed Tracy Debugger (no issues), uninstalled Jumplinks and re-installed....no luck. I turned on debug mode in Jumplinks and if I open the source (original) URL in a browser, the debug screen isn't shown. If I register a new jumplink and don't have "blog/" in the source, everything works fine. Even stranger, if I try to visit one of the source URLs with "blog/" in it, the content for the intended page is displayed, but the address bar still shows the source (original) url. I've been pulling my hair out all day and have run out of ideas, please help! 😃

Share this post


Link to post
Share on other sites

Are those domain.test/blog/post/ URLs based on URL segments in the template?
If so... that might be the reason why JumpLinks doesn't kick in.

It's not a solution but maybe another thing you could look into.

Share this post


Link to post
Share on other sites

Ok. I don't know if there is anything modified in your site or a difference in our installed modules so this might not work but I just installed ProcessBlog & MarkupBlog and of course the latest Jumplinks module.

I unpublished the example post, opened it in a private window where a 404 showed up.
I looked into the Jumplinks 404 monitor and found the request.
I opened that entry, created a new jumplink from it and visited the URL in a private window again and... it worked.

ProcessWire 3.0.123 the other modules straight from modules.processwire.com.

2019-10-10-230022_812x599_scrot.png.f40dc5d362b40a4e8a1874da9df3a352.png

Share this post


Link to post
Share on other sites
4 minutes ago, wbmnfktr said:

I opened that entry, created a new jumplink from it and visited the URL in a private window again and... it worked.

Yeah, it's weird... I've been using this module for a couple years and never had a problem. The redirects do still work on any source url that don't have "blog/" in them. I'm stumped. Here are the modules I've added in case it helps, all are the latest versions.

AdminOnSteroids
AutoSmush
BlogPublishDate
FieldtypeStarRating
FormBuilder
GoogleClientAPI
InputfieldFormBuilderFile
InputfieldStarRating
MarkupBlog
MarkupSimpleNavigation
MarkupSitemapXML
ProCache
ProcessBlog
ProcessDatabaseBackups
ProcessFormBuilder
ProcessJumplinks
ProcessProCache
ProcessTracyAdminer
ProcessWireUpgrade
ProcessWireUpgradeCheck
TracyDebugger
WireMailGmail

Share this post


Link to post
Share on other sites

@Ben Sayers This could indicate that something's wrong with your blog setup. To clarify, are you deleting posts or un-publishing them? Either way, whatever is going on here is preventing the 404 event from kicking in, which means Jumplinks has nothing to do. When it comes to common patterns like this (ie, "blog/*"), the only things that come to mind are urlSegments and custom htaccess directives, both of which I suspect are not the case for you. Worst case, I would try reproducing on a fresh install.

On a side note: I don't know ProCache very well, but could it possibly be that?

Share this post


Link to post
Share on other sites

@apeisa I think I'll take the trimming option here, for now. I have been doing incremental work on JL2 in my very short-lived spare-time, and will be using a text column for referrers in the hits table. I'm deciding whether or not the 404 monitor should still be a separate module like I'd originally intended - still makes more sense to me, but either way, the same column type will be used there.

Share this post


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

On a side note: I don't know ProCache very well, but could it possibly be that?

From my experience: Jumplinks and ProCache play really nice together. 

  • Like 1

Share this post


Link to post
Share on other sites
On 10/11/2019 at 12:01 AM, Mike Rockett said:

To clarify, are you deleting posts or un-publishing them? When it comes to common patterns like this (ie, "blog/*"), the only things that come to mind are urlSegments and custom htaccess directives

I deleted the posts. I do use URL segments for the AMP versions of my pages but I'm not creating any jumplinks for those (yet). The only htaccess directives I added are for alternate domain names to redirect them to our primary domain. Like this:

RewriteCond %{HTTP_HOST} ^secondarydomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.secondarydomain.com$
RewriteRule (.*)$ https://www.primarydomain.com/$1 [R=301,L]

 

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 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.
    • By adrian
      This module allows you to automatically rename file (including image) uploads according to a configurable format
      This module lets you define as many rules as you need to determine how uploaded files will be named and you can have different rules for different pages, templates, fields, and file extensions, or one rule for all uploads. Renaming works for files uploaded via the admin interface and also via the API, including images added from remote URLs.   Github: https://github.com/adrianbj/CustomUploadNames
      Modules Directory: http://modules.processwire.com/modules/process-custom-upload-names/
      Renaming Rules
      The module config allows you to set an unlimited number of Rename Rules. You can define rules to specific fields, templates, pages, and file extensions. If a rule option is left blank, the rule with be applied to all fields/templates/pages/extensions. Leave Filename Format blank to prevent renaming for a specific field/template/page combo, overriding a more general rule. Rules are processed in order, so put more specific rules before more general ones. You can drag to change the order of rules as needed. The following variables can be used in the filename format: $page, $template, $field, and $file. For some of these (eg. $field->description), if they haven't been filled out and saved prior to uploading the image, renaming won't occur on upload, but will happen on page save (could be an issue if image has already been inserted into RTE/HTML field before page save). Some examples: $page->title mysite-{$template->name}-images $field->label $file->description {$page->name}-{$file->filesize}-kb prefix-[Y-m-d_H-i-s]-suffix (anything inside square brackets is is considered to be a PHP date format for the current date/time) randstring[n] (where n is the number of characters you want in the string) ### (custom number mask, eg. 001 if more than one image with same name on a page. This is an enhanced version of the automatic addition of numbers if required) If 'Rename on Save' is checked files will be renamed again each time a page is saved (admin or front-end via API). WARNING: this setting will break any direct links to the old filename, which is particularly relevant for images inserted into RTE/HTML fields. The Filename Format can be defined using plain text and PW $page variable, for example: mysite-{$page->path} You can preserve the uploaded filename for certain rules. This will allow you to set a general renaming rule for your entire site, but then add a rule for a specific page/template/field that does not rename the uploaded file. Just simply build the rule, but leave the Filename Format field empty. You can specify an optional character limit (to nearest whole word) for the length of the filename - useful if you are using $page->path, $path->name etc and have very long page names - eg. news articles, publication titles etc. NOTE - if you are using ProcessWire's webp features, be sure to use the useSrcExt because if you have jpg and png files on the same page and your rename rules result in the same name, you need to maintain the src extension so they are kept as separate files.
      $config->webpOptions = array(     'useSrcExt' => false, // Use source file extension in webp filename? (file.jpg.webp rather than file.webp) ); Acknowledgments
      The module config settings make use of code from Pete's EmailToPage module and the renaming function is based on this code from Ryan: http://processwire.com/talk/topic/3299-ability-to-define-convention-for-image-and-file-upload-names/?p=32623 (also see this post for his thoughts on file renaming and why it is the lazy way out - worth a read before deciding to use this module). 
       
       
      NOTE:
      This should not be needed on most sites, but I work with lots of sites that host PDFs and photos/vectors that are available for download and I have always renamed the files on upload because clients will often upload files with horrible meaningless filenames like:
      Final ReportV6 web version for John Feb 23.PDF

×
×
  • Create New...