Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2018-03-21 10:43:24

etc
Developer
Registered: 2010-11-11
Posts: 2,950
Website

Re: [TXP v4.7+] When a theme is stored in the database, will it lose data?

Is the warning issued before data is erased? After would be too late.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#12 2018-03-21 10:52:11

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,462
Website

Re: [TXP v4.7+] When a theme is stored in the database, will it lose data?

Not sure. Would have to check the code.

From what Nicolas said yesterday, the process is:

  • Merge content from any existing templates in the intended direction.
  • This includes adding new stuff so if there are any name violations, they will be flagged by this stage.
  • Gather the list of source templates, compare them to the list of destination templates and remove the differences.

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

Offline

#13 2018-03-21 10:54:05

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,462
Website

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

Offline

#14 2018-03-21 11:05:13

etc
Developer
Registered: 2010-11-11
Posts: 2,950
Website

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.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#15 2018-03-21 11:10:57

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

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.

Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#16 2018-03-21 11:16:16

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,462
Website

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

Offline

#17 2018-03-21 11:32:49

etc
Developer
Registered: 2010-11-11
Posts: 2,950
Website

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.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#18 2018-03-21 11:36:04

Summer
Member
Registered: 2018-01-29
Posts: 48

Re: [TXP v4.7+] When a theme is stored in the database, will it lose data?

Thank everyone, I understand

Offline

#19 2018-03-21 12:34:25

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,550
Website

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.

Offline

#20 2018-03-21 12:46:15

etc
Developer
Registered: 2010-11-11
Posts: 2,950
Website

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.


etc_[ query | search | pagination | date | tree | cache ]

Offline

Board footer

Powered by FluxBB