Jump to content

Module: Process Changelog


teppo

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
Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
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.

Link to comment
Share on other sites

  • 2 months later...

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.

Link to comment
Share on other sites

  • 2 months later...
  • 4 months later...

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.

Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
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
Link to comment
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
Link to comment
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.

Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

  • 7 months later...

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