Jump to content
teppo

Module: Process Changelog

Recommended Posts

Actually there was no need for version_compare(): hooking into something that doesn't exist doesn't seem to cause any issues. While hooking into savePageOrFieldReady would make sense, at this point I'm not ready to ditch 2.x support, and since that's not an option, I don't really see any benefit in it :)

Latest version, just pushed to GitHub, fixes one minor bug and adds support for saveFieldReady.

  • Like 4

Share this post


Link to post
Share on other sites

Hey @teppo, I've just ran some tests and it seems both saves during inline editting and/or running Page Actions are now properly logged. Thanks! 

  • Like 5

Share this post


Link to post
Share on other sites

So, this is kind of a heads-up: I've just pushed version 1.3.2 of ProcessChangelog to GitHub, and this version includes a bunch of UI changes. Hopefully they make as much sense to you folks as they do for me.

To be honest the old look of the module was a bit too ProcessWire 2.0'ish, and I've also been meaning to add clickable action/template links etc. for a while now.

changelog-132-gui.png

  • Like 7

Share this post


Link to post
Share on other sites

hi teppo,

i totally missed this module... did you see my new SVN module for fields and templates?

maybe you could integrate it into your module? i think that would make sense. i planned to create an overview page, but it seems it would be better to integrate that into your module, as the work is already done and quite same from functionality perspective.

one idea to improve this list would be that you also integrate "versions" like i did in my SVN module. than one could make as many changes as one wanted and in the end bump the version number and see a list like that:

// show changes from version 0.1 to 0.2

user           | date of last change     | action                 | changes       |
-----------------------------------------------------------------------------------
admin          | 2.1.2016                | changed field body     | 4             |
admin          | 1.1.2016                | changed page sample    | 1             |

maybe you could also use the diff tool for page changes? i've not looked into your module yet, so this are wild ideas ;)

what do you think?

update: versions would totally make sense for both your and my module. having the option to set the version + add a comment (like a commit in github) and then making the version number clickable and see all changes for that version would be a great help.

Share this post


Link to post
Share on other sites

Hey man, love this module! This data has helped me many times. I was wondering though as I have been querying against this data in the database if you had any plan to add any other search options. I have had the need to find changes on individual items and being able to insert a text string for a field could be super helpful.

Share this post


Link to post
Share on other sites

Hey there @arjen totally forgot about this question, I did end up finding that thing and am now happily using it to keep an eye on changes. Super helpful module!

  • Like 2

Share this post


Link to post
Share on other sites

This module is great, thanks for sharing it. I am missing one thing that I would like to hear if it could be integrated. :-)

What I really would like to see, is what data has been changed. Just the data value. So when an input field changes value, I would like to know what that value is.

Share this post


Link to post
Share on other sites

Hi @teppo,

Bug report: (sometimes?) in the RSS the date shown is the Created date of the Post not the Modified timestamp. I've been able to live with this, however, should you have a minute or two, chould you please fix it?

Cheers

Edited by szabesz
typo

Share this post


Link to post
Share on other sites

@szabesz: so far I've been unable to reproduce this issue or figure out it's source. The RSS feed should use the timestamp column from database, and that in turn should be the date of the edit (according to MySQL, as this column is automatically set to CURRENT_TIMESTAMP). 

Are you sure that this issue only shows up at the RSS feed and not the main Changelog view too?

  • Like 1

Share this post


Link to post
Share on other sites

@Vayu Robins: thanks for your suggestion, but to be honest I'm a bit hesitant when it comes to this module and tracking values. I'm hoping to update my Version Control module to PW3 sometime soon, and perhaps after that I'll revisit this idea.

Just to be clear, there are a couple of reasons why I'm hesitant about this:

  • First of all that would require storing a lot of additional data, which could quickly become a performance issue. Sure, I could make this an optional feature, but all things considered I'm just not sure if it's really worth it.
  • Second of all storing and outputting such data would get really complicated really soon. It's easy as long as we're just talking about simple text or textarea type fields, but what about HTML, fieldtypes with a bunch of different data columns, and files or images? The easy way out would be to only support a limited set of fieldtypes, but I'm worried that this would be a slippery slope :)
  • And, finally, I'd like to draw some sort of a line between this module and Version Control. Version Control is the rather complex beast that allows you not just to view what was changed, but also makes it possible to switch between different versions of a page. Changelog was always intended as a simple tool for quickly checking who changed what and when.
  • Like 1

Share this post


Link to post
Share on other sites
10 hours ago, teppo said:

Are you sure that this issue only shows up at the RSS feed and not the main Changelog view too?

Thanks for taking a look at it. To tell the truth, I'm not quite sure what actually happens but in my RSS reader (Vienna) the log entries do not show up in the order of the timestamp column. Maybe a bug in Vienna?

I will take a closer look and investigate it more detail and report back.

Share this post


Link to post
Share on other sites

Thanks, @szabesz. You should probably check if the actual RSS feed has the items in correct order. Just open it in your browser and see how it works there.

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, teppo said:

You should probably check if the actual RSS feed has the items in correct order. Just open it in your browser and see how it works there.

I am sorry for the false alarm, it was my mistake not to investigate what is actually going on before asking you to fix it. It appears that it is indeed Vienna which gets confused and turns – for example – "Tue, 08 Aug 2017 07:27:17 -0400" into "2017. 07. 27. at 14:23". It is a guess but it seems to me that 07:27 is turned into 07. 27. Either way, I need to pick a different RSS reader even though Vienna works well with other feeds but not this one. I just found Shrook for Mac which seems to be ok <pubdate>

  • Like 1

Share this post


Link to post
Share on other sites

Well, something fishy is still going on because both Vienna and Shrook have just reported log entries from yesterday, while I have already had lots of entries after that one too. I will further investigate this when I have the time but now I have asap work to do.

  • Like 1

Share this post


Link to post
Share on other sites

@szabesz: that seems pretty weird indeed. I guess it could have something to do with different timezone settings and such.. or not. For the time being I've updated the module to use the DATE_RSS constant instead of the 'r' date format for RSS feed dates, but as far as I can tell that should not make any actual difference. Just a precaution, really.

Anyway, let me know if you figure out anything new :)

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, teppo said:

Just a precaution, really.

Thank you! I've just updated the module and keep an eye on what is going to happen onwards.

Edited by szabesz
typo

Share this post


Link to post
Share on other sites

I've just updated this module on my local and development servers. On the local machine there were no problems, however, on the dev server after updating the site's gone down with a 500 error and the log shows "Compile Error:     Can't use method return value in write context (line 346 of /var/www/sm-prod-new/site/assets/cache/FileCompiler/site/modules/ProcessChangelog/ProcessChangelogHooks.module)".

The only way I can see to get the site back up and running is to remove the ProcessChangelong directory from the Site > Modules folder. Once back on the site though I still have the Changelog page in the menu, it just shows the message "The process returned no content."

If I try to reinstall the module I get the error message again and the site goes down. I'm running ProcessWire 3.0.62.

  • Like 1

Share this post


Link to post
Share on other sites

Once I tried to uninstall the module and I had the same result as you had. Luckily the module works so I reverted to database backup which I always perform before upgrades and I reinstalled the files.

I am also interested in how to solve it even though currently I do not have to....

Edited by szabesz
typo

Share this post


Link to post
Share on other sites

Sorry, @houseofdeadleg and @szabesz. Looks like one of my previous performance improvements caused this module to require PHP 5.5+ , which is probably the source of the issue you experienced.

The latest version pushed to GitHub reverts that particular change, so upgrading to the latest version should fix this issue.

  • Like 1

Share this post


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

require PHP 5.5+

Thanks for the quick update! However, I use PHP 5.6.31.

Share this post


Link to post
Share on other sites

Maybe I did not have the exact same issue, sorry for being misleading. I could "uninstall" the module by clicking on the button in the admin, but after that I deleted the module files too and I  got something very similar as explained by @houseofdeadleg. I just did not have time to investigate so I reverted to my backup.

Edited by szabesz
typo

Share this post


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

Sorry, @houseofdeadleg and @szabesz. Looks like one of my previous performance improvements caused this module to require PHP 5.5+ , which is probably the source of the issue you experienced.

The latest version pushed to GitHub reverts that particular change, so upgrading to the latest version should fix this issue.

Not a problem, thanks for the quick fix. Reinstalled and working perfectly :)

  • Like 1

Share this post


Link to post
Share on other sites

Hey @teppo - I just noticed that with Chrome, it is reporting that JS is disabled:

image.png.d4c05c8b06d9b6547460b8414e07de1b.png

It's fine with Firefox though.

 

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 Gadgetto
      SnipWire - Snipcart integration for ProcessWire
      Snipcart is a powerful 3rd party, developer-first HTML/JavaScript shopping cart platform. SnipWire is the missing link between Snipcart and the content management framework ProcessWire.
      With SnipWire, you can quickly turn any ProcessWire site into a Snipcart online shop. The SnipWire plugin helps you to get your store up and running in no time. Detailed knowledge of the Snipcart system is not required.
      SnipWire is free and open source licensed under Mozilla Public License 2.0! A lot of work and effort has gone into development. It would be nice if you could donate an amount to support further development:

      Status update links (inside this thread) for SnipWire development
      2020-01-19 -- integrated taxes provider finished (+ very flexible shipping taxes handling) 2020-01-14 -- new date range picker, discount editor, order notifiactions, order statuses, and more ... 2019-11-15 -- orders filter, order details, download + resend invoices, refunds 2019-10-18 -- list filters, REST API improvements, new docs platform, and more ... 2019-08-08 -- dashboard interface, currency selector, managing Orders, Customers and Products, Added a WireTabs, refinded caching behavior 2019-06-15 -- taxes provider, shop templates update, multiCURL implementation, and more ... 2019-06-02 -- FieldtypeSnipWireTaxSelector 2019-05-25 -- SnipWire will be free and open source Plugin Key Features
      Fast and simple store setup Full integration of the Snipcart dashboard into the ProcessWire backend (no need to leave the ProcessWire admin area) Browse and manage orders, customers, discounts, abandoned carts, and more Process refunds and send customer notifications from within the ProcessWire backend Complete Snipcart webhooks integration (all events are hookable via ProcessWire hooks) Integrated taxes provider (which is more flexible then Snipcart own provider) Useful Links
      SnipWire in PW modules directory (alpha version only available via GitHub) SnipWire Docs (please note that the documentation is a work in progress) SnipWire @GitHub (feature requests and suggestions for improvement are welcome - I also accept pull requests) Snipcart Website  
      ---- INITIAL POST FROM 2019-05-25 ----
       
    • By d'Hinnisdaël
      Happy new year, everybody 🥬
      I've been sitting on this Dashboard module I made for a client and finally came around to cleaning it up and releasing it to the wider public. This is how it looks.
      ProcessWire Dashboard

      If anyone is interested in trying this out, please go ahead! I'd love to get some feedback on it. If this proves useful and survives some real-world testing, I'll add this to the module directory.
      Download
      You can find the latest release on Github.
      Documentation
      Check out the documentation to get started. This is where you'll find information about included panel types and configuration options.
      Custom Panels
      My goal was to make it really simple to create custom panels. The easiest way to do that is to use the panel type template and have it render a file in your templates folder. This might be enough for 80% of all use cases. For anything more complex (FormBuilder submissions? Comments? Live chat?), you can add new panel types by creating modules that extend the DashboardPanel base class. Check out the documentation on custom panels or take a look at the HelloWorld panel to get started. I'm happy to merge any user-created modules into the main repo if they might be useful to more than a few people.
       Disclaimer
      This is a pre-release version. Please treat it as such — don't install it on production sites. Just making sure 🍇
      Roadmap
      These are the things I'm looking to implement myself at some point. The wishlist is a lot longer, but those are the 80/20 items that I probably won't regret spending time on.
      Improve documentation & add examples ⚙️ Panel types Google Analytics ⚙️ Add new page  🔥 Drafts 🔥 At a glance / Page counter 404s  Layout options Render multiple tabs per panel panel groups with heading and spacing between ✅ panel wrappers as grid item (e.g. stacked notices) ✅ Admin themes support AdminThemeReno and AdminThemeDefault ✅ Shortcuts panel add a table layout with icon, title & summary ✅ Chart panel add default styles for common chart types ✅ load chart data from JS file (currently passed as PHP array) Collection panel support image columns ✅ add buttons: view all & add new ✅
    • By Robin S
      This module is inspired by and similar to the Template Stubs module. The author of that module has not been active in the PW community for several years now and parts of the code for that module didn't make sense to me, so I decided to create my own module. Auto Template Stubs has only been tested with PhpStorm because that is the IDE that I use.
      Auto Template Stubs
      Automatically creates stub files for templates when fields or fieldgroups are saved.
      Stub files are useful if you are using an IDE (e.g. PhpStorm) that provides code assistance - the stub files let the IDE know what fields exist in each template and what data type each field returns. Depending on your IDE's features you get benefits such as code completion for field names as you type, type inference, inspection, documentation, etc.
      Installation
      Install the Auto Template Stubs module.
      Configuration
      You can change the class name prefix setting in the module config if you like. It's good to use a class name prefix because it reduces the chance that the class name will clash with an existing class name.
      The directory path used to store the stub files is configurable.
      There is a checkbox to manually trigger the regeneration of all stub files if needed.
      Usage
      Add a line near the top of each of your template files to tell your IDE what stub class name to associate with the $page variable within the template file. For example, with the default class name prefix you would add the following line at the top of the home.php template file:
      /** @var tpl_home $page */ Now enjoy code completion, etc, in your IDE.

      Adding data types for non-core Fieldtype modules
      The module includes the data types returned by all the core Fieldtype modules. If you want to add data types returned by one or more non-core Fieldtype modules then you can hook the AutoTemplateStubs::getReturnTypes() method. For example, in /site/ready.php:
      // Add data types for some non-core Fieldtype modules $wire->addHookAfter('AutoTemplateStubs::getReturnTypes', function(HookEvent $event) { $extra_types = [ 'FieldtypeDecimal' => 'string', 'FieldtypeLeafletMapMarker' => 'LeafletMapMarker', 'FieldtypeRepeaterMatrix' => 'RepeaterMatrixPageArray', 'FieldtypeTable' => 'TableRows', ]; $event->return = $event->return + $extra_types; }); Credits
      Inspired by and much credit to the Template Stubs module by mindplay.dk.
       
      https://github.com/Toutouwai/AutoTemplateStubs
      https://modules.processwire.com/modules/auto-template-stubs/
    • By Mike Rockett
      Jumplinks for ProcessWire
      Release: 1.5.60
      Composer: rockett/jumplinks
      ⚠️ NOTICE: 1.5.60 is an important security patch-release for an XSS vulnerability discovered by @phlp. It's HIGHLY RECOMMENDED that all Jumplinks users update to the latest version as soon as possible.
      Jumplinks is an enhanced version of the original ProcessRedirects by Antti Peisa.
      The Process module manages your permanent and temporary redirects (we'll call these "jumplinks" from now on, unless in reference to redirects from another module), useful for when you're migrating over to ProcessWire from another system/platform. Each jumplink supports wildcards, shortening the time needed to create them.
      Unlike similar modules for other platforms, wildcards in Jumplinks are much easier to work with, as Regular Expressions are not fully exposed. Instead, parameters wrapped in curly braces are used - these are described in the documentation.
      Under Development: 2.0, to be powered by FastRoute
      As of version 1.5.0, Jumplinks requires at least ProcessWire 2.6.1 to run.
      View on GitLab
      Download via the Modules Directory
      Read the docs
      Features
      The most prominent features include:
      Basic jumplinks (from one fixed route to another) Parameter-based wildcards with "Smart" equivalents Mapping Collections (for converting ID-based routes to their named-equivalents without the need to create multiple jumplinks) Destination Selectors (for finding and redirecting to pages containing legacy location information) Timed Activation (activate and/or deactivate jumplinks at specific times) 404-Monitor (for creating jumplinks based on 404 hits) Additionally, the following features may come in handy:
      Stale jumplink management Legacy domain support for slow migrations An importer (from CSV or ProcessRedirects) Feedback & Feature Requests
      I’d love to know what you think of this module. Please provide some feedback on the module as a whole, or even regarding smaller things that make it whole. Also, please feel free to submit feature requests and their use-cases.
      Note: Features requested so far have been added to the to-do list, and will be added to 2.0, and not the current dev/master branches.
      Open Source

      Jumplinks is an open-source project, and is free to use. In fact, Jumplinks will always be open-source, and will always remain free to use. Forever. If you would like to support the development of Jumplinks, please consider making a small donation via PayPal.
      Enjoy! 🙂
    • By Robin S
      Add Image URLs
      Allows images/files to be added to Image/File fields by pasting URLs.

      Usage
      Install the Add Image URLs module.
      A "Paste URLs" button will be added to all image and file fields. Use the button to show a textarea where URLs may be pasted, one per line. Images/files are added when the page is saved.
       
      https://github.com/Toutouwai/AddImageUrls
      https://modules.processwire.com/modules/add-image-urls/
×
×
  • Create New...