Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [TXP v4.7+] When a theme is stored in the database, will it lose data?
The point is, during export (for example) you are told whether anything is amiss. If you choose to ignore that information and immediately wipe-import, well, your funeral… right?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: [TXP v4.7+] When a theme is stored in the database, will it lose data?
Bloke wrote #310185:
The point is, during export (for example) you are told whether anything is amiss. If you choose to ignore that information and immediately wipe-import, well, your funeral… right?
Right, I have tested.
Offline
Re: [TXP v4.7+] When a theme is stored in the database, will it lose data?
Sorry, I sometimes forget the forum…
- Import (sync.): import valid template files (then, delete all extra templates);
- Export (sync.): export valid template files (then, delete extra valid templates files);
- Delete (sync): delete valid template files.
The weird things that the regex introduce are the following
- on import a file violating the naming convention would not be considered as a valid template file and would not be imported but no warning would be displayed neither. It could probably be enhanced.
- the sync. process remove extra templates from the DB even if they violate the naming convention while it does not remove files violating this convention as they are not considered as valid templates.
Offline
Re: [TXP v4.7+] When a theme is stored in the database, will it lose data?
Thanks for the clarification. Are these major issues? Probably not in 80%+ of use cases.
As we look at webhook/direct file access, we can consider such corner cases over the next week after beta.2 is released and see if there’s anything we need to do in this regard.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: [TXP v4.7+] When a theme is stored in the database, will it lose data?
Bloke wrote #310189:
Are these major issues? Probably not in 80%+ of use cases.
I’d say this is an issue as soon as you have an unconventionally named form. You export the db template, get a warning, work on the flat copy for few days, forget about the warning, reimport the theme to db — the form is gone. Dunno what to do, though.
Offline
#18 2018-03-21 11:36:04
- Summer
- Member
- Registered: 2018-01-29
- Posts: 60
Re: [TXP v4.7+] When a theme is stored in the database, will it lose data?
Thank everyone, I understand
Offline
Re: [TXP v4.7+] When a theme is stored in the database, will it lose data?
etc wrote #310191:
I’d say this is an issue as soon as you have an unconventionally named form. You export the db template, get a warning, work on the flat copy for few days, forget about the warning, reimport the theme to db — the form is gone. Dunno what to do, though.
At one in point in the recent past, not sure if here in the forum or on Github, there was a conversation about adding an informative message below the name
form or page templates, or issuing a warning when saving the form with “disallowed” characters in the name.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: [TXP v4.7+] When a theme is stored in the database, will it lose data?
phiw13 wrote #310194:
At one in point in the recent past, not sure if here in the forum or on Github, there was a conversation about adding an informative message below the
name
form or page templates, or issuing a warning when saving the form with “disallowed” characters in the name.
I’ve seen few live sites with those “invalid” form names, it’s too late to warn their authors (and restrictive too). We should find a way to convert any string to some fs-safe version (unicode? something else?). Or don’t touch such forms at all. Or decompose “synchronize” option in two more verbose steps: delete + import.
Offline
Re: [TXP v4.7+] When a theme is stored in the database, will it lose data?
The regex was inherited from Gocom’s rah_flat. Could we just remove it (or make it consistent with the DB related naming conventions)? If a file fail to be written, it should display a warning anyway. Then, nothing more we can do I guess.
Last edited by NicolasGraph (2018-03-21 12:55:30)
Offline
Re: [TXP v4.7+] When a theme is stored in the database, will it lose data?
NicolasGraph wrote #310196:
The regex was inherited from Gocom’s rah_flat. Could we just remove it (or make it consistent with the DB related naming conventions)? If a file fail to be written, it should display a warning anyway. Then, nothing more we can do I guess.
No, I’m afraid, a file could be written to a wrong directory if the name contains /
or .
or something else as weird. I feel that this sync
options should be off
by default and not memorized, until we find a solution.
Offline
Re: [TXP v4.7+] When a theme is stored in the database, will it lose data?
etc wrote #310202:
No, I’m afraid, a file could be written to a wrong directory if the name contains
/
or.
or something else as weird.
/
is not allowed in names but .
is, you’re right.
I feel that this
sync
options should beoff
by default and not memorized, until we find a solution.
It seems reasonable.
Last edited by NicolasGraph (2018-03-21 14:21:34)
Offline