Jump to content

Version Control


teppo

Recommended Posts

@adrian - Thanks for that. That's usually what we do for the primary DB instance when we aren't using GCP. For us, setting the DB instance flags in Google Cloud SQL accomplishes the same thing via their admin console. In case anyone needs it: this is Google's reference for Cloud SQL's flags. Do note, there's a known issue that there's no automatic daylight saving adjustment.

I prefer to leave the UTC with no offset. I'll likely look at the module's source a little closer and modify the input/output timestamps from PW to match the client user's timezone.

Link to comment
Share on other sites

On 1/29/2022 at 7:53 AM, MindFull said:

One thing I noticed is that the revision timestamp is being generated by the database and not via PHP. So when the two services are on separate machines, with different timezone configurations, the timestamps don't match up with the activity on the web server. Just discovered this as one of our client's databases went down and a failover database in another zone took its place. Revisions were showing that the users had traveled to the future... 5 hours from now. ?

That does seem like an issue. I have a vague memory that I might've had to make changes related to the timestamps at some point in the past, but can't remember what it was all about. For the time being I'll open a GitHub issue for this, as it might require a bit of digging and testing to make sure that everything works as expected ?

Link to comment
Share on other sites

  • 7 months later...
25 minutes ago, gebeer said:

@teppo can this module handle multilang fields? Couln't find anything in the module description or this thread.

README lists three supported multilingual fieldtypes:

  • Text (regular and multi-language)
  • Textarea (regular and multi-language)
  • Page Title (regular and multi-language)

Technically other multilanguage fieldtypes should be supported as well, but these are the ones I've tested. Version Control has a config setting for enabling fieldtypes that are available on the site, but not listed as compatible by default.

  • Like 1
Link to comment
Share on other sites

  • 5 months later...

Hi @teppo, first of all, thank you for this wonderful module! Do you see a possibility that ProFields Table will be supported in the future? I am certainly willing to sponsor (part of) the development costs for this!

Link to comment
Share on other sites

  • 3 weeks later...

Thanks for the great module!

Sadly, I'm now seeing error after updating my MAMP install to PHP 8.0.8. See errors below, other versions numbers for this install are:

PW 3.0.200
VersionControl 2.4.0 / VersionControl Cleanup 1.0.0 - this error doesn't occur with VersionControl 1.3.5 without the cleanup module.

Errors on admin pages:

Warning: scandir(db/variations): Failed to open directory: No such file or directory in .../site/modules/VersionControl/VersionControlCleanup.module on line 117
Warning: scandir(): (errno 2): No such file or directory in .../site/modules/VersionControl/VersionControlCleanup.module on line 117
Warning: foreach() argument must be of type array|object, bool given in .../site/modules/VersionControl/VersionControlCleanup.module on line 118
Warning: scandir(db/): Failed to open directory: No such file or directory in .../site/modules/VersionControl/VersionControlCleanup.module on line 124
Warning: scandir(): (errno 2): No such file or directory in .../site/modules/VersionControl/VersionControlCleanup.module on line 124
Warning: Cannot modify header information - headers already sent by (output started at .../index.php:55) in .../wire/core/WireHttp.php on line 1688


Error trace box content:

Look out… Fatal Error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in site/modules/VersionControl/VersionControlCleanup.module:124

#0 site/modules/VersionControl/VersionControlCleanup.module (124): count(false)
#1 site/modules/VersionControl/VersionControlCleanup.module (95): VersionControlCleanup->cleanupFiles()
#2 wire/core/Wire.php (417): VersionControlCleanup->cleanup(Object(HookEvent))
#3 wire/core/WireHooks.php (1062): Wire->_callMethod('cleanup', Array)
#4 wire/core/Wire.php (485): WireHooks->runHooks(Object(LazyCron), 'everyDay', Array)
#5 wire/modules/LazyCron.module (198): Wire->__call('everyDay', Array)
#6 wire/core/WireHooks.php (1059): LazyCron->afterPageView(Object(HookEvent))
#7 wire/core/Wire.php (485): WireHooks->runHooks(Object(ProcessPageView), 'finished', Array)
#8 index.php (56): Wire->__call('finished', Array)
#9 {main}
thrown (line 124 of site/modules/VersionControl/VersionControlCleanup.module)

Seems to refer to this line (124 of the Cleanup module):
 

if (count(scandir($dir)) == 1) wireRmdir($dir, true);

Sadly my knowledge / understanding of what's going on ends here but hoping it can be fixed or it is something else in my install.

Link to comment
Share on other sites

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