trilbymedia / grav-plugin-git-sync

Collaboratively Synchronize your Grav `user` folder hosted on GitHub, BitBucket or GitLab
Apache License 2.0
240 stars 58 forks source link

Grav 1.7RC with Flex Pages and Grav 1.6.21 unable to setup Git Sync #159

Closed paulhibbitts closed 4 years ago

paulhibbitts commented 4 years ago

Hi @w00fz , I've started doing more testing with 1.7 Flex Pages and I think I've come across an issue:

1) Update new Grav install with 1.7RC6 2) Enable Flex pages front-end 3) Run Git Sync Wizzard and complete

The wizard when completed will re-appear, and you will see the following error message:

2020-02-11_18-07-16

If I can be of any help re: testing more info etc. please let me know.

BTW, it seems that if you install Git Sync on 1.7RC6, and THEN turn on Flex Pages front-end things work fine (though sometimes there might be up to a minute before change is reflected on site).

Thanks very much, Paul

w00fz commented 4 years ago

Thanks, we'll take a look!

/cc @mahagr

mahagr commented 4 years ago

@w00fz This is because of the plugin has strict mode turned on and there was a bug preventing blueprint strict mode from working.

Not sure why there's extra variable in the configuration, is it set in the form?

mahagr commented 4 years ago

Looks like I cannot change the title, but this would happen also with the old pages. :)

paulhibbitts commented 4 years ago

Hi @w00fz , I've just had someone contact me about this error now happening with the latest Stable Grav release, and I can confirm as I just did a test install myself.

If I can be of any more help please let me know.

mahagr commented 4 years ago

This is the fix from Grav 1.6.20 causing the issue: https://github.com/getgrav/grav/issues/1273

The fix is correct, so the bug is in the plugin configuration.

w00fz commented 4 years ago

Can you make gitsync right then 🙂?

mahagr commented 4 years ago

For now, I reverted the validation: strict fix in Grav 1.6, but it does not fix issues in Grav 1.7.

w00fz commented 4 years ago

Thanks @mahagr

mahagr commented 4 years ago

I'm going to reopen this as it's not fully solved in Grav 1.7.

In fact, I was not able to reproduce the issue; saving worked just fine for me even with the strict limitations.

I'm not sure why there's data[test_var] and where it is coming from. All the variables that shouldn't be saved into configuration should be outside of data anyway, though for me it was like that.

w00fz commented 4 years ago

@paulhibbitts do you have that text_var field in the gitsync plugin blueprint or saved in the user config somewhere? It is a bit odd it fails on that field.

paulhibbitts commented 4 years ago

Hi @w00fz I don't think I added anything on my end... I will try to setup an online test version going that you can take a look at too.

paulhibbitts commented 4 years ago

@w00fz , I've got a test site going online with the issue - will connect on Discord with login info etc.

paulhibbitts commented 4 years ago

Thanks to the detective work of @w00fz I tracked down this issue to a deprecated item in the plugin config file - solved by removing this item (which was caught due to the improvements for strict validation).