Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Textpattern's setup process
@tye
Good spot on issue 2, I’ll see if it’s possible to put a message in the config setup page. I’ve also noticed that if you create a config.php with different settings than those displayed then it also halts at this page with no extra warning message.
Offline
Re: Textpattern's setup process
Quite an improvement (and I like the fact that one can choose an admin theme at the end of the process… one step less).
Questions: on two of the panes, a password must be input (first for the DB, then for the user password). Shouldn’t those fields be input[type=password]
? Ok, may be the first one is kinda moot as the whole thing is shown in the next step anyway, once ready to fill the config.php; for the second one, though, wouldn’t it be better ?
Last edited by phiw13 (2012-07-13 09:06:35)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Textpattern's setup process
@phiw13
Agreed – I’ve now made the admin account one a password type input. I’ve left the database one as a text input (r3960).
Offline
Re: Textpattern's setup process
We’d rather have a “verify password” input then, too. Otherwise some people will have their caps-lock/num-lock on, mistype or otherwise fail to enter their desired password.
Offline
Re: Textpattern's setup process
@wet
Ah, true. That’s too ‘programmy’ for me to do, you or Stef will have to add that, sorry.
Offline
#18 2012-07-13 09:44:43
- jelle
- Member
- Registered: 2006-06-07
- Posts: 165
Re: Textpattern's setup process
Bloke wrote:
as of Txp 4.5, you may put custom install code into
/update/custom/post-update*.php
which can be used to alter the DB on first install)
Interesting. How would that work exactly?
I’d still like a simple checkbox to prevent setup from filling the database with dummy articles, categories and stuff.
Offline
Re: Textpattern's setup process
jelle wrote:
Interesting. How would that work exactly?
You copy a file named post-update-whatever.php
into the /textpattern/update/custom/
folder when you upload Textpattern. Whenever your site is updated to a new Textpattern version these scripts are run at the end of the process. The actual implementation is completely up to you – you can even truncate database tables.
We suggest to adhere to this convention: Put custom code into file(s) at textpattern/update/custom/post-update-abc-foo.php
where ‘abc’ is the third party’s reserved prefix (see Reserved plugin prefixes) and ‘foo’ is whatever you like. The execution order among all files is undefined.
Offline
Re: Textpattern's setup process
Did some more testing. The most error-prone issue I see is that the generated config.php
file might not be valid PHP. The strings added to the config array aren’t sanitized or escaped correctly, and can lead to invalid PHP.
One the second, Add config file, step there seems to be some contradicting information when connection using specified credentials isn’t successful, but isn’t enough to invoke error messages:
Connected
Database does not exist or your specified user does not have permission to access it.
I mean is it OK or not? There are no errors, two paragraphs of text.
MySQL username […] database […] server
There is may be an unwanted behavior with these. It will proceed creating a MySQL link even if you don’t specify an user, server and database, all which should be required in this scenario.
When the MySQL user or server is left empty, the MySQL connection is created using either defaults set in server configuration or the current process owner. This may lead to successful link, but the user will end up with the options being empty in the generated config.php file. While things may work for now, this may cause issues in the long rung when and if the process owner changes etc. Relaying to this PHP’s MySQL extensions feature might not be the best idea, and user may accidentally fall to its victim. I would suggest making those fields mandatory. When a MySQL user, server or database is left empty, you could just skip creating the link and state that the options required to proceed.
Last edited by Gocom (2012-07-13 09:53:38)
Offline
Re: Textpattern's setup process
@jelle
That seems like a nice idea. Not sure it can be done for v4.5 though.
A kicked another idea about with Stef the other day. Maybe one day we could expand the new “Site configuration” section of the setup process to include:
<label for"whatever">Front-side theme</label> <a class="pophelp" ...>?</a></label>
<select name="whatever" id'="whatever">
<option>Core: blog</option>
<option>Core: business</option>
<option>Core: magazine</option>
<option>Twitter Bootstrap</option>
<option>Zurb Foundation</optipon>
...etc...
</select>
How good would that be? Anyway, that’s a topic for a future discussion.
Last edited by philwareham (2012-07-13 09:59:17)
Offline
Re: Textpattern's setup process
I left the password box open for the simple reason I couldn’t be bothered to put a second password and verification step in.
They’re useless anyway imo. Because I’m lazy I always type the password into a text editor, then paste it in twice. Waste of effort otherwise. Same with stupid systems that get you to verify e-mail addresses; I just type it in once, CTRL-A, CTRL-C, Tab, CTRL-V. How that stops me making an error is beyond me; if people who run sites think I’m wasting time typing the same thing twice, they’ve got another thing coming. It’s how I maintain the illusion of doing tonnes of things at once; through an insanely optimised keystroke process :-p I have to wait for computers, they never have to wait for me.
But if people really feel strongly that we need two password boxes with asterisks in them, another error message, and it benefits the UX, then what the heck.
Last edited by Bloke (2012-07-13 13:11:21)
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
Re: Textpattern's setup process
Gocom wrote:
When the MySQL user or server is left empty, the MySQL connection is created using either defaults set in server configuration or the current process owner.
The connection might also be created with a user name from ~/.my.cnf
. I think this is a valid use case.
Offline
Re: Textpattern's setup process
wet wrote:
The connection might also be created with a user name from
~/.my.cnf
. I think this is a valid use case.
That is true. What do think if the confg.php
was populated with the user-details used during install? To prevent MySQL from changing to a superuser. I know it’s very edge case. Its very unlikely that someone leaves the fields empty by accident and then gets successful link in top of everything.
Offline