-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create placeholder content when running standard install profile #519
Comments
Here's the drupal.org issue: https://www.drupal.org/node/79582 The solutions proposed in that issue are all over the place: a new .inc file for profiles, creating an entirely new profile "Standard with demo content", and somehow even importing content via JSON/YML/feeds is suggested at the end. However, the interesting thing from reading that is that most posters seem to be interested in providing default content. It's all just a matter of how that default content should be added. I think for starters, let's do exactly what you're suggesting and just provide a single sample node out-of-box in the standard.profile, describing itself as a sample and how to edit it. @Bojhan was participating in that issue a few years ago. Perhaps he'd have some input here as well. |
This seems related to this issue I opened last year. |
Wow. I hope we're not still discussing this 8 years from now!
Thats it. Obvious advantages over "Duh you dont have a post yet!" |
Does it make sense to put that in function system_update_1036() {
$node = array( or am i way off base here? |
We'd probably put it in |
Nice one @serundeputy. PR at backdrop/backdrop#713. We'll need to wait on this until the 1.1.x branch exists at least. In the mean time, anyone else have input? The PR does exactly what @docwilmot described. |
could be a 1.1 milestone? (crickets) |
Sure! No reason why not. I don't think this would be considered an API change. The PR still needs a small amount of work, and should be squashed together to make a single commit. |
updated and |
Thanks @serundeputy. It looks like we may have a lot of tests that assume either the default front page content or a situation where the first node created is "node ID 1" (which it won't be after this change). We can probably fix most of these tests by adding: protected $profile = 'minimal'; At the top of some of these test classes. That will switch the installation profile from "standard" to "minimal", which doesn't include this change. The minimal install profile also contains fewer modules and runs faster anyway, so we should be using it whenever we can in tests. If switching to the minimal profile breaks more than it fixes, we'll just need to update the tests to work with the new front page node. |
sounds good I'll give it a go tonight.
|
if i put the same in /**
* Tests glossary view ( summary of arguments ).
*/
class ViewsGlossaryTestCase extends ViewsSqlTest {
protected $profile = 'minimal'; they pass. @quicksketch what do you think? |
That's great. The more tests we convert to using the minimal (or even better the "testing") profile, the faster our tests will run. Any test that can be converted to use a lighter installation profile we should switch. |
updated should we open a ticket to convert tests to 'testing' profiles; perhaps per module to make more manageable? |
good novice tickets to get people involved? |
It depends... sometimes I feel like our "novice" issues are still pretty difficult. SimpleTest is not a very trivial tool to understand. Though once you understand the UI for it, it can be pretty straightforward. We could mark them novice if we write up a details set of instructions. |
travis test failed; running through tests on local updating to use |
so it looks like tests that depend on logging in a user with $views_admin = $this->backdropCreateUser(array('administer views', 'administer blocks', 'bypass node access', 'access user profiles', 'view revisions')); |
Should we also add this node as an entry in the Main Menu? For similar reasons, it lets the new Backdropper know that the menu exists, and leads them there if they want to learn more about menus, or to delete or modify it. |
sounds good to me. @quicksketch what do you think? |
What should the menu item say, "About" or "Example"? node/1 is usually an about page for me. It may be less frustrating for a new user to just modify the content of the node to be an about page than find the menu settings on the node form. |
I think the menu entry should be the node title. |
No progress made on this since last release, officially bumping from 1.5 to 1.x-future. |
Update to this, assigning me. I'm suggesting two default nodes:
|
Reassigning to 1.5 since it looks like it's got a shot now! :) |
Get 'em @docwilmot! |
@docwilmot got it so, so very close. I've fixed the last three tests and they are testing now at backdrop/backdrop#1578 |
Looking good! Tests are passing but there are a few issues:
|
Looks like the nodes were created before the aliases were set. I'll move them to below.
Agree, and done.
That's because the path wasn't matching up. Fixed up now, and testing. backdrop/backdrop#1578 |
backdrop/backdrop#1578 has been merged into 1.x for 1.5.0. Yay! This was our last item for release! |
Instead of the unhelpful "no content created yet" message, how about a default "Your first article" node like WP does?
PR from @docwilmot at backdrop/backdrop#1566PR from @jenlampton at backdrop/backdrop#1578
The text was updated successfully, but these errors were encountered: