Jump to content

Recommended Posts

I haven't had a chance to play with this yet, but I know it will be used on an upcoming site - just wanted to say how great it looks and most importantly how impressive the documentation looks to be - love the use of Github wiki!

  • Like 1

Share this post


Link to post
Share on other sites

You were probably going to have countless issues if you'd played with it before yesterday as I didn't test across multiple PHP/MySQL versions. (I'm lazy like that.)

But all seems to be good now - lemme know if you bump into any issues.

Was going to host the docs myself... but the tools are there, so use them - hehe!

:)

Share this post


Link to post
Share on other sites

The mapping collection API has been modified:

  1. Method has changed from addCollection() to collection() due to:
  2. the fact that it now picks up if a collection already exists so that it can add data to it.

Docs updated.

(Thanks Dave.)

Share this post


Link to post
Share on other sites

Just fixed up a little issue regarding the first TIMESTAMP column being auto-updated.

Basically swapped the created_at and updated_at columns around, and removed the updated_at = CURRENT_TIMESTAMP bit from the SQL template used for updating mapping collections.

I could have just defaulted to NULL for both of these timestamps, but I think this is better. Who cares about column order, anyway?

Share this post


Link to post
Share on other sites

Okay, so after all those fixes, my testing seems to show that everything is stable. Everyone agree? I'd like to set this to stable in GH and in the directory.

  • Like 1

Share this post


Link to post
Share on other sites

Are we ready to go ahead and make this stable? I haven't encountered any further issues...

Hell yeah. I didn't encounter any further problems, but I haven't done the big test yet. 

  • Like 1

Share this post


Link to post
Share on other sites

I've just installed the module, but it seems the redirect is to late and I get a "Cannot modify header information - headers already sent by" error.

Edit:

Changing the hook from addHook() to addHookBefore() solved the issue.

Share this post


Link to post
Share on other sites

I've just installed the module, but it seems the redirect is to late and I get a "Cannot modify header information - headers already sent by" error.

Edit:

Changing the hook from addHook() to addHookBefore() solved the issue.

What sent headers first?

Share this post


Link to post
Share on other sites

My templates _init.php, but even as I removed that part the rendering of mustache in a appended TemplateFile was earlier than Jumplinks.

Share this post


Link to post
Share on other sites

I see. So there could be a lot of scenarios involved. Think it would be worth it to change the hook to something way early, and then check to see if a page representing the request exists? We could also add a configuration option that defaults the hook to pageNotFound, but allows you to specify if something is rendering output before the 404. Would be a simple checkbox that says, "Check Jumplinks in an early event - this prevents interruptions from other hooks/templates/etc."

What do you think?

Side note: my Redirects module for Bolt ties into a very early app event. Sure, the caveat is that pages that exist with the request uri are ignored, but we could add a simple check. Perhaps it would also perform redirects faster, as less things boot up?

Share this post


Link to post
Share on other sites

I think the hook is the right one, just addHookBefore does force template rendering to wait for your hooked function to finish, while addHook doesn't seem to do this.

Share this post


Link to post
Share on other sites

I think we're ready for stable. I'm first going to switch over to prepared statements - silly me for not doing this first. Once done, I'll switch over to stable.

Share this post


Link to post
Share on other sites

Version Bump to 1.1.0

Module is now stable (it looks to be, at least).

  1. Now using PDO Prepared Statements
  2. Tables honour responsiveness now - there was an issue with tfoot, so I just hid it from mobile...
  3. Various bug fixes
  4. No schema changes

Let me know if you bump into anything weird.  ;)

Oh, and there's this issue - anyone have any input on that? (Personally, I prefer to have full control... Don't really like modules making decisions for me.)

  • Like 3

Share this post


Link to post
Share on other sites

Version Bump to 1.1.1

  1. Using minified JS (manual call)
  2. Refactor SQL object
  3. Various other changes/fixes
  4. No schema changes

(And GitHub is under attack - boy, how I battled to commit the changes... Finally slipped through after about 20 minutes of trying.)

  • Like 2

Share this post


Link to post
Share on other sites

Version Bump to 1.1.2

  1. Correct page-check behaviour (was using name, now using URI)
  2. Use commitJumplink in CSV importer
  3. No schema changes
  • Like 2

Share this post


Link to post
Share on other sites

I actually had to uninstall the module - it was causing excessive mysql database connections (not usage) and my webserver nearly stalled.

Maybe I run into a loop or something?

I was redirecting from an old Drupal website to PW and used about 70 simple type redirects, such as sources  /drupal/page1/   

Got this (on the latest PW dev)

Error:

Exception: SQLSTATE[HY000]: General error: 1116 Too many tables; MySQL can only use 61 tables in a join (in /wire/core/PageFinder.php line 300)

Error:

Exception: DB connect error 1203 - User already has more than 'max_user_connections' active connections (in /wire/core/Database.php line 68)

I cannot say 100% that this was Jumplinks. I just noted that the performance was back to normal after I uninstalled the module.

So this is just for information in case anyone else can confirm this.

Share this post


Link to post
Share on other sites

Thanks for your post. :-)

Looks like another module is doing that. Jumplinks only creates two tables (one for jumplinks, and another for mapping collections).

In terms of performance, I'm unable to test that sort of thing. Are you saying that those errors go away when you uninstall Jumplinks? Do you have the same issue if you use ProcessRedirects?

If you (or anyone else) could provide me with more information, that would be great. Otherwise, I can't determine what's going on.

Share this post


Link to post
Share on other sites

On the topic of performance, I'm now wondering if I should set up a cache system for Jumplinks. It was mentioned by Antti a while back that Jumplinks is already feature-rich, but I think that caching redirects will actually be a life-saver for some users with large sites. At the end of the day, running the regex engine for every incoming request is sure to be a big performance hit on any server (the way I see it).

I'm sure everyone agrees this should be added?

There are also a few other fixes and enhancements in the pipeline, the most important one involves optional query-strings (much like the QSA flag for mod_rewrite). At the moment, if you want to match something.php and something.php?foo is requested, the redirect will not occur. In order to get it to work, you'd need to add {all} on the end of the source URI, which is, quite frankly, not the best way of doing it.

  • Like 3

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 BitPoet
      As threatened in Ryan's announcement for 3.0.139, I built a little module for sliding toggles as a replacement for checkboxes. Styling of the input is CSS3 only (with all the usual caveats about older browsers), no JS necessary, and may still be a bit "rough around the edges", so to speak, since I didn't have much time for testing on different devices or brushing things up enough so I'd feel comfortable pushing it to the module directory. But here's the link to the GitHub repo for now:
      InputfieldSlideToggle
      Fieldtype and Inputfield that implements smartphone-style toggles as replacement for checkbox inputs. The visualization is CSS-only, no additional JS necessary.
      Status
      Still very alpha, use with caution!
      Features / Field Settings
      Size
      You can render the toggles in four different sizes: small, medium, large and extra large.
      Off Color
      Currently, "unchecked" toggles can be displayed either in grey (default) or red.
      On Color
      "Checked" toggles can be rendered in one of these colors: blue (default), black, green, grey, orange or red.
      Screenshots

      Some examples with checkbox label


      View all Size and Color Combinations
      Small toggles Medium toggles Big toggles Extra big toggles  









    • By Orkun
      Hi Guys
      I needed to add extended functionalities for the InputfieldDatetime Module (module is from processwire version 2.7.3) because of a Request of Customer.
      So I duplicated the module and placed it under /site/modules/.
      I have added 3 new Settings to the InputfieldDatetime Module.
      1. Day Restriction - Restrict different days based on weekdays selection (e.g. saturday, sunday) - WORKING

       
      2. Time Slots - Define Time slots based on custom Integer Value (max is 60 for 1 hour) - WORKING

       
      3. Time Range Rules per Weekday - Define a minTime and MaxTime per Weekday (e.g. Opening Hours of a Restaurant) - NOT WORKING PROPERLY

       
      The Problem
      Time Slots and Day Restriction working fine so far. But the Time Range Rules per Weekday doesn't work right.
      What should happen is, that when you click on a date, it should update the minTime and maxTime of the Time Select.
      But the change on the select only happens if you select a date 2 times or when you select a date 1 time and then close the datepicker and reopen it again.
      The time select doesn't get change when you select a date 1 time and don't close the picker.
      Here is the whole extended InputfieldDatetime Module.
      The Files that I have changed:
      InputfieldDatetime.module InputfieldDatetime.js jquery-ui-timepicker-addon.js (https://trentrichardson.com/examples/timepicker/) - updated it to the newest version, because minTime and maxTime Option was only available in the new version  
      Thats the Part of the JS that is not working correctly:
      if(datetimerules && datetimerules.length){ options.onSelect = function(date, inst) { var day = $(this).datetimepicker("getDate").getDay(); day = day.toString(); var mintime = $(this).attr('data-weekday'+day+'-mintime'); var maxtime = $(this).attr('data-weekday'+day+'-maxtime'); console.log("weekday: "+day); console.log("minTime: "+mintime); console.log("maxTime: "+maxtime); var optionsAll = $(this).datetimepicker( "option", "all" ); optionsAll.minTime = mintime; optionsAll.maxTime = maxtime; $(this).datetimepicker('destroy'); $(this).datetimepicker(optionsAll); $(this).datetimepicker('refresh'); //$.datepicker._selectDate($(this).attr("id"),date); //$.datepicker._base_getDateDatepicker(); // var inst = $.datepicker._getInst($(this)); // $.datepicker._updateDatepicker(inst); /*$(this).datetimepicker('destroy'); InputfieldDatetimeDatepicker($(this), mintime, maxtime); $(this).datetimepicker('refresh'); */ // $(this).datetimepicker('option', {minTime: mintime, maxTime: maxtime}); } } Can you have a look and find out what the Problem is?
      InputfieldDatetime.zip
       
      Kind Regards
      Orkun
    • By teppo
      This module tracks changes, additions, removals etc. of public (as in "not under admin") pages of your site. Like it's name says, it doesn't attempt to be a version control system or anything like that - just a log of what's happened.
      At the moment it's still a work in progress and will most likely be a victim of many ruthless this-won't-work-let's-try-that-instead cycles, but I believe I've nailed basic functionality well enough to post it here.. so, once again, I'll be happy to hear any comments you folks can provide
      https://modules.processwire.com/modules/process-changelog/
      https://github.com/teppokoivula/ProcessChangelog
      How does it work?
      Exactly like it's (sort of) predecessor, Process Changelog actually consists of two modules: Process Changelog and Process Changelog Hooks. Hooks module exists only to serve main module by hooking into various functions within Pages class, collecting data of performed operations, refining it and keeping up a log of events in it's own custom database table (process_changelog.) Visible part is managed by Process Changelog, which provides users a (relatively) pretty view of the contents of said log table.
      How do you use it?
      When installed this module adds new page called Changelog under Admin > Setup which provides you with a table view of collected data and basic filtering tools See attached screenshots to get a general idea about what that page should look like after a while.
      For detailed installation instructions etc. see README.md.
       


    • By Gadgetto
      Status update links (inside this thread) for SnipWire development will be always posted here:
      2019-08-08
      2019-06-15
      2019-06-02
      2019-05-25
      If you are interested, you can test the current state of development:
      https://github.com/gadgetto/SnipWire
      Please note that the software is not yet intended for use in a production system (alpha version).
      If you like, you can also submit feature requests and suggestions for improvement. I also accept pull requests.
      ---- INITIAL POST FROM 2019-05-25 ----
      I wanted to let you know that I am currently working on a new ProcessWire module that fully integrates the Snipcart Shopping Cart System into ProcessWire. (this is a customer project, so I had to postpone the development of my other module GroupMailer).
      The new module SnipWire offers full integration of the Snipcart Shopping Cart System into ProcessWire.
      Here are some highlights:
      simple setup with (optional) pre-installed templates, product fields, sample products (quasi a complete shop system to get started immediately) store dashboard with all data from the snipcart system (no change to the snipcart dashboard itself required) Integrated REST API for controlling and querying snipcart data webhooks to trigger events from Snipcart (new order, new customer, etc.) multi currency support self-defined/configurable tax rates etc. Development is already well advanced and I plan to release the module in the next 2-3 months.
      I'm not sure yet if this will be a "Pro" module or if it will be made available for free.
      I would be grateful for suggestions and hints!
      (please have a look at the screenshots to get an idea what I'm talking about)
       




    • By apeisa
      Update 31.7.2019: AdminBar is now maintained by @teppo. Modules directory entry has been updated, as well as the "grab the code" link below.
      ***
      Latest screencast: http://www.screencas...73-ab3ba1fea30c
      Grab the code: https://github.com/teppokoivula/AdminBar
      ***
      I put this Adminbar thingy (from here: http://processwire.c...topic,50.0.html) to modules section and to it's own topic.
      I recorded quick and messy screencast (really, my first screencast ever) to show what I have made so far. You can see it from here: http://www.screencas...18-1bc0d49841b4
      When the modal goes off, I click on the "dark side". I make it so fast on screencast, so it might seem a little bit confusing. Current way is, that you can edit, go back to see the site (without saving anything), continue editing and save. After that you still have the edit window, but if you click "dark side" after saving, then the whole page will be reloaded and you see new edits live.
      I am not sure if that is best way: there are some strengths in this thinking, but it is probably better that after saving there shouldn't be a possibility to continue editing. It might confuse because then if you make edits, click on dark side -> *page refresh* -> You lose your edits.
      ***
      When I get my "starting module" from Ryan, I will turn this into real module. Now I had to make some little tweaks to ProcessPageEdit.module (to keep modal after form submits). These probably won't hurt anything:
      if($this->redirectUrl) $this->session->redirect($this->redirectUrl); if(!empty($_GET['modal'])) $this->session->redirect("./?id={$this->page->id}&modal=true"); // NEW LINE else $this->session->redirect("./?id={$this->page->id}");   and...
      if(!empty($_GET['modal'])) { $form->attr('action', './?id=' . $this->id . '&modal=true'); } else { $form->attr('action', './?id=' . $this->id); // OLD LINE }  
×
×
  • Create New...