Thanks @dorsetdigital, hopefully hosting will respond to my request!
I'm trying to check with hosting company. Unfortunately it's client's hosting account, not mine so I'm just hoping that they will remember that I'm legit! Because I'm 'abroad' for the next few days!
Spark still offers an http://xtra.co.nz email address -- maybe not to new clients but if does support long-term clients who already use this. Nothing worse than a telco who suddenly withdraws email service and tells people to bugger off the GMail... ask any Vodafone customer!
I've asked her -- unfortunately we have a 5-hour time difference until next week which doesn't help! She is no doubt in bed at the moment!
I was hoping it was down to spam filters... as I said I'm not getting a copy either and I can't see it in any spam filtering? Mail is hosted on a related domain, and also at a large telco-owned ISP (http://xtra.co.nz). Have changed sender address to a generic one from the same domain, haven't touched SPF records but as mentioned everything has been working for a couple of years. And now it doesn't... 🤔
Hi @dorsetdigital, yes, it goes to the client's email address and a copy to me. I've tried test submissions but I'm not getting the copy at my end? Thought it happened suddenly down to an ISP problem but now I'm not so sure...
Hi people, I'm running a SS4 site with Silverstripe Enquiry Form handling form submissions. For some reason it seems to have stopped sending submissions through. Can anybody shed any light?
… so just to clarify @nightjarnz — this is a server setting rather than a Silvertripe setting?
Hi people, today’s question: where can I set size limit for uploaded assets (namely PDF documents)? Client wants to upload PDFs larger than 2MB but can’t…
Hi people, got a Database 101 question here; if I add the following to my page:
- private static $db = [
- 'Subtitle' => 'HTMLText',
- 'SingleColumn' => 'HTMLText'
I should see two new database fields generated for
$SingleColumn data, right? This should appear when I
Except this doesn’t appear to be happening? Further to my questions yesterday, it would appear that the corresponding fields in the CMS don’t have a table in the db to write to…
Did I miss anything?
page as in
Yes, it's a new page type based on Page
private static $table_name = ‘LandingPage’;
Then yes, you should see both fields added to the database, unless
Page already has one of those fields defined.
you can try to make double sure by running
(to ensure the flush is happening first, if the fields aren't showing).
table name shouldn't matter @web - just makes things easier for those that go DB spelunking.
or writing (generating) queries that aren't stupidly long.
New users might not know that it uses the namespace otherwise. So they are looking for the wrong name etc
also resolves issues with 'odd' chars in table names (
Yes, it also helps aid migrations, preserving data in unnamespaced tables. But aside from this it is mostly to do with human benefits, setting
table_name isn't required for things to function :)
This has got beyond me! I’ve pulled unused page types out of the dev site, rebuilt database, reintroduced
TwoColumnPage.php, rebuilt database (small changes), tested — data entered in new filed wasn’t uploaded/saved. Dropped entire database, restored from backup, rebuilt, think I saw fields appear, tested and — data entered in new filed wasn’t uploaded/saved. Been stuffing about with this for a few days now — is there any way I can introduce this site to the concept of democracy?
Can anybody tell me where to check if the fields actually exist? phpMyAdmin? Perhaps?
Sorry for the rant but it’s getting bloody frustrating!!! 😫
When you do the dev/build/, scroll down to under Creating database records do you see \TwoColumnPage in the list?
Hi @web, yes I did. And now, looking at phpMyAdmin, I see that there is a table for that page type ––
utf8_general_ci, no attributes, ‘null’ =
yes, default =
none, no ‘comments’ and no ‘extra’ ??
Mean anything to you?
Now if you go to the CMS, have you created a page using the TwoColumnPage template? I know it sounds like a stupid question, but just checking.
On that page you should have your new fields in the Main tab.
Done and just re-done. Page works, saved successfully — only thing is when I save page text entered in
Single Column field vanishes… completely… 😪
Are you able to post your TwoColumnPage code here?
Not a problem @web! Thanks for taking a look…
I see the problem. In your TextareaField you have a space for the field name parameter ‘Single Column’. You want to add it like TextareaField(‘SingleColumn’‘.‘Single Column’). The first parameter is your DB field name and the second is the title you want to display.
Basically, there is no field in the DB called ‘Single Column’, it is called ‘SingleColumn’ without the space between the words.
We’re talking Line 36, right?
$fields->addFieldToTab(“Root.SingleColumn”, new TextareaField(‘SingleColumn’,‘Single Column’));
Hmmm — a very worrying underline right aliong that line. And a ‘white screen of death’ in browser?!
Aha!! Got it. Thanks @web!! Owe you one!!
Now — how could I add *TinyMCE` editor to this field??? Can this be done?
Yes, that is easy, however you would have to update your DB record to HTMLText and then change the TextareaField into HTMLEditorField.
Thanks guys. Will look at this!!
Cool!! Got it! One final question: is there a way to add this to the main content screen rather than the
well actually, for a sneaky trick, the reason this may have tripped you up @mike_henden is that SilverStripe scaffolder will automatically insert spaces into field names (aka unique ID, first param) to generate the title (param 2) where CamelCase is involved.
thisfieldname will be used as the title
thisfieldname where as
ThisFieldName will become
This Field Name.
Important to note is that this does NOT happen in reverse ;)
i.e. spaces are not removed to search for a matching field name on a DataObject when
Form::saveInto is used.
and for the last question there,
where tab name in this case would probably be
@nightjarnz -- sneaky indeed! Does the use of single quotes prevent this? Thanks everybody for your help -- SS4 is a whole new ball game!!
Nope. Strings are strings, it's only variable interpolation that double quotes allow (i.e. at definition time, the do nothing to the 'type' of resulting string).
so, long story short:
HTMLEditorField::create('SingleColumn') would work just fine, and still render the title as
FYI, that "sneakiness" is done by
FormField::name_to_label() which I find super useful, and use it all the time
Same, it was just interesting to me reading this thread how much I take it for granted though.