See subject... I give up on Neos for now. I need a website and with Neos It's not gonna work without PHP coding on my site. Simple content elements don't cut it for me. TS2 might be the best thing since sliced bread and maybe you can create logic with it but I have not the slightest idea how. The lack of documentation is a really big problem for me. The few lines that do exist don't help much to understand the system. It just claims that things work in a certain way but it just shows an example and doesn't explain it. Some things in the docs are still wrong because something has changed dramatically in the meantime.
There are still bugs in the 1.0.1 release version. The most annoying of them are already fixed in GIT but there is no new release. There is no announcement for a new release either. At least none that I know of. To be honest I'm not even sure if any substential amount of people working on it right now. Which is understandable I guess. You know, high workload before 1.0, christmas, new years etc. :-) I totally understand and I don't blame them. Nonetheless does it affect me in my decision to use a certain product or not.
Anyways, I need some sort of CMS. And it has to have some more functionality that "just" pages and content. For now I will look out for something else to run this page. It makes me sad that I have to take this step! Seriously! I really wanted to work but I don't have unlimited amounts of time to put into this. And so far, the journey was really exhausting. It's always two steps forward and one and a half steps back.
My original plan was to improve documentation. I hoped the "learning by doing" approach would work here. But turns out, Neos is a tiny bit to complex with all it's new components to do that.
I will definitely continue to play around with Neos but as far as this site goes. It has to be something else until Neos can be used by other people than the ones who built it.
Hi folks, I do realize that not much has happened here lately. But I have to say, I'm pretty fed up with Neos right now. It great and all, but I can't make it work for everything that is important to me. I break it constantly beyond repair. I don't know how many times I had to reset my database because of some strange exceptions. I got some awesome help in the IRC chat, thanks to everyone over there!!!
Right now I'm wrestling with an old problem that I thought was solved a long time ago. The problem of meaningful error messages. I'm totally fine with the fact that a new system has many many small little issues. I know from experience, that simply takes a while to iron out every little annoyance. As a developer you tend to avoid situations that are not exactly rock solid. You don't even do that by intention, it just happens. A bad habit I have to fight every single day!
Look at the image at the end of this post. This is what I get when I import my Site into a 1.0.1 installation. All pages beneath the root are ok and don't show this error. I tried everything I could find. Export the site, add missing nodes and re-import the site. Using the CLI to create missing childnodes (node:autocreatechildnodes) for pages and shortcuts. Messing around with the DB. No luck.
If you have any idea how to solve this, please let me know at firstname.lastname@example.org.
Right now, I'm not sure how to continue. My project fails at the smallest possible things right now and it's incredibly frustrating. :( This makes me sad, as the team doesn't deserve to be let down like this. If only I'd know how to solve this issues.
I got my notebook back and I continued to set up my page with Neos. After some strange effects I had with the beta1 I updted to beta2 yesterday. I finally got my own nodetype running and the deployment to my local virtual machine works quite reliably! :-)
What's missing now is the integration of my articles into Neos. I have a basic understanding how it should work but I'm not 100% certain how it should be done. The concrete question is, where do I store my articles? All on the homepage? That doesn't sound right does it. I think I have to check a few other projectes that where mentioned to me lately. And again, I can only thank all the great people at the flow and neos chatrooms on IRC. They are a great help and never too tired to help.
Oh yeah, and here is a sneak peak of the current status of my installation:
I just want to let you know, that my computer is at the shop because it needs repair. So I can't do anything for a couple of days. I will continue as soon as I get it back. I just hope I don't have to set up everything from scratch again.
Alright, I fiddelt around with the Surf deployment the last days. I have it basically working right now. I can deploy a Neos instance with my own Site package to a virtual machine which is my satging system at the moment. But if I can do that, the deployment to the live system shouldn't be much different.
That's all great, but I'm facing a problem right now. When the deployment went through, I end up with a Routes.yaml in the Configuration folder that referes to the Welcome package which is not installed. I really wonder where this is coming from. I looked through almost all packages that are installed in the process and didn't find a reference to this setting anywhere. Right now I guess, that the composer config is not correct, but I hadn't had the chance to talk to anybody yet.
Maybe you see the mistake? Check out this gist that contains my composer file, the Surf setup, and the result Routes.yaml. Please, let me know if you have any hint. https://gist.github.com/thomashempel/ff4a5494dcc0dbf95c80
UPDATE Benjamin Albrecht told me on Twitter, that this Routes.yaml is copied by the post update/install script which can be found in "TYPO3/Flow/Composer/InstallerScripts::postUpdateAndInstall". I'm still not sure why the Flow package comes with a default configuration for the Welcome package. Is this a bug or a feature?
Well, at least I can fix this now by providing my own script... I think.
The other day I made a GitLab update. GitLab is the Git management tool I use on my server. It much like GitHub. It has a small issue tracker, knows different users and private repositories. It also provides Wiki functionality.
So why am I telling you this? Well, because the newest version 6.2 has support for public repositories. Which means, that I can publish the stuff I’m doing here.
To be totally honest with you, I don’t know yet what that will be. But it’s good to know that I can when the time comes.
After the first few days with very fast progress I slowed down a bit. This doesn't mean, that this experiment is over! ;-)
The opposite is the case. Right now I try to get a grip on Deployment of Neos. I talked to co-workers who did this already and I have a good idea how I want to realize this.
Now, deployment is the one thing. The even more important thing on my list is, that I need a working solution for editing this page. Editing one file sucks, and I don't want to start managing single files for each post. I just feel that it is not worth the effort at this point.
And last but not least I want some styling. This page really hurts the eye doesn't it. ^^ - The good news is, I already have complete template for this page. I bought that a while ago for another project which never made it far enough. All I have to do is to integrate it. Nothing easier than that right?
After everything worked out way to smooth I actually hitting my first bump on this road. ;-) Not that I didn't expected this. So, no blame whatsoever.
First thing that happens is, that your can't create any content in a newly created site package, that was build with Neos 1.0 alpha7. All "add" buttons are inactive. With the quick help form Berit on Twitter, I solved the problem by simply creating a new page.
There is also a bug report for this issue in case you want to follow: http://forge.typo3.org/issues/53290
Now the second thing is a little bit stranger. I somehow managed to completely break my installation. There is no backend, and no frontend rendering.
I'm not entirely sure what happened here. All I know is, that for some reason Neos expects some "landingPage" TypoScript which doesn't exist apparently. I did set that option at one time, but on a page that I deleted later. So I don't know where this setting is coming from on this particular page.
FYI, this is the error I get now:
Exception while rendering default: No "default" TypoScript object found. Please make sure to define one in your TypoScript configuration. (20131103124431b95371)
What's really problematic about this situation is, that I can't change it. The PHP probably throw an exception which no prevents the backend from beeing rendered. I'm more or less locked out.
I think I have to look at the database to rescue this installation.
[Digging around in the database]
I somehow managed to fix this. There are two things I learned from this:
It’s time to create a Neos website! Woohoo! \o/
But first things first. To have a clean state I just create a completely new Neos instance via composer.
composer create-project --dev --stability alpha typo3/neos-base-distribution Neos
Step 2, create a virtual host.
Step 3, http://local.scriptme.de/setup
Step 4, Set file permissions (I can’t believe I forget this every single time!)
Step 5, Run setup, but this time I create a new site instead of importing anything.
Step 6, Hold your breath in sight of the beauty that is "A freshly created template for your new site!” :-)
Okay, I have my own site package now in Packages/Sites/Scriptme.ScriptmeDe. I think I will put that under Version control first… Done!
Alright, let’s check it out what we have here.
[10 minutes later]
Random thought of the day: “How do I add a new content element to an empty page?"
Before I start deploying Neos with Surf I’d like to have all the deployment configuration under version control. The question is, how the heck should I do this?
I ask myself this every time since we first used deployments at work. I never had to deal with the solution so this bites me, now that I need it.
Let’s approach this logical, shall we?
Looking at the deployment setup, all we need in the VCS is the composer.json file and the build scripts I’d say. Everything else is framework and stuff we don’t care about in a deployment instance.
Okay, let’s do this.
When I was creating the Git repository inside my local deployment instance, I found something interesting. When you install Flow and Surf via Composer, a .gitignore file is created even though there is no Git repository. I’m not sure if that is a mistake or by intention.
If this ignore file is created intentionally, it’s a little strange what it contains. It basically excludes everything, even the configuration. So even if you put the folder into version control it will never control anything. I’m not sure what the purpose of this is.
Anyway, this is very easy to circumvent. I just removed the “/Build/“ folder from the ignore list and added it to VCS as well as the composer.json file.
One can argue, that the composer.lock should be in the VCS as well, but I think this is not important in this case.
My first impression is, that this could work. Let's see how it works out over time.
This shouldn't be too hard.
The download page on http://neos.typo3.org is saying, that Neos should be installed via Composer. Okay, cool. Nothing easier than that.
For the first try I will just install Neos and I think the demo page is included with the Alpha. Let's see.
create-project --dev --stability alpha typo3/neos-base-distribution Alpha7Seem to work. But it throughs many warnings that read like this
"Class TYPO3\Flow\Composer\InstallerScripts is not autoloadable, can not call post-package-install script"I wonder what this means.
Oh well, this seems to be a known issue. (http://forge.typo3.org/issues/50954) My Composer version seems out of date.
My version: a2a70380c14a20b3f611d849eae7342f2e35c763
composer selfupdate Updating to version d3ff302194a905be90136fd5a29436a42714e377.
So, that didn't help... :-/ Whatever, it worked last time. Let's do this.
Setting up my VirtualHost and don't forget the /etc/hosts entry. Open http://local.neos/setup for the first time.
Narf, file permissions. Easy enough to fix...
sudo ./flow flow:core:setfilepermissions thomas www www
And again. SUCCESS!
Quickly go through the setup.
Let's go straight to the backend.
Works, now that was easy! :-)
P.S.: I made a few screenshots along the way. I will add them as soon as I have a little more technical help on my side.
I slowly feel the pain of maintaining this. Or I feel how hard it must be for you to read this. So I think the next step will be to get this page into Neos somehow. Afaik I need a Sitepackage to do that. I'm not sure yet how I approach this. I guess there is no documentation around to help me with the research.
Me default move would be to "reverse engineer" the demo site. Learning by doing. So my feeling is, that the steps will get a little smaller from here on out.
Nevertheless feel invited to follow me! Thanks for reading.
PSA! This is NOT a tutorial or even a manual. This are just the steps I took to arrive 8the other of the article (I don't know if I succeed at the point of writing). I also don't explain everything here! I try to set links to every external tool, so some assembly required.
Let's go. So TYPO3.Surf is a Flow package. Logical first step, install Flow. Normally I would checkout the git repository. Let's try a different approach this time.
sudo ./flow core:setfilepermissions thomas www wwwShouldn't make a big difference but anyway.
Let's see what
./flow package:listhas to say:
server:Deployment thomas$ ./flow package:list ACTIVE PACKAGES: Composer.Installers Doctrine.Common Doctrine.DBAL 2.3.4 Doctrine.ORM 2.3.4 TYPO3.Flow TYPO3.Fluid TYPO3.Kickstart TYPO3.Party TYPO3.Welcome doctrine.migrations mikey179.vfsStream symfony.console symfony.domcrawler symfony.yamlBummer, TYPO3.Surf is nowhere to be seen.
OK, let's check the website... [10 minutes later] Nothing. Oh man...
Let's check forge.typo3.org. Awesome, there is a page for TYPO3.Surf: http://forge.typo3.org/projects/show/package-typo3-surf
No information, some activity, many issues and Subversion repository? ^^ - Hm, what to do next? Let's ask Twitter, maybe I overlooked something.
Woohoo, got some answers. The documentation can be found inside the package. Tobi also mentioned that he has written something about it in his blog. Let's check it out (http://etobi.de/blog/2013/07/deployment-workshop-on-typo3-devdays-t3dd13-part-110/)
... [reading] ...
Hm, seems to be targeted towards TYPO3 CMS. Well, the first two articles could be something.
... [more reading] ...
Oh well, seems I did it all wrong. Found a comment on the blog that suggests using Composer, which is the official way of installing Flow apparently. (http://etobi.de/blog/2012/05/deployment-setup-typo3-surf/#comment-656)
Okay, not loosing much work here. Let's delete everything.
cd .. rm -rf Deployment
curl -sS https://getcomposer.org/installer | phpFor mor information check http://www.getcomposer.org
composer create-project typo3/flow-base-distribution Deployment cd Deployment
composer require typo3/SurfComposer asks me for a version constraint. Hm, that wasn't mentioned in the comment. But again, I'm lucky today. I already know that the surf version should be "@dev". SUCCESS!
./flow surf:listgives me
Deployments: flow3base-distribution phoenix-distribution
On to reading the Surf documentation on how to setup my deployment.
Looks like I need a PHP file that represents my deployment. The file should be located in Build/Surf/. Fair enough, let's create such a file... I just call it static-scriptme-de.php for now.
Hm... Everyone is talking about applications... But, I don't have an application yet. :-/ I wonder if the names are described somewhere...
That is actually very nicely described on http://etobi.de/blog/2012/10/deployment-write-a-deployment-recipe-for-typo3-surf/.
Once the file is created a new deployment appears as a result of the list command. \o/
Let's run it, just for fun:
./flow surf:deploy static-scriptme-de Deploying static-scriptme-de (20131102112739) Uncaught Exception No application configured for deployment More Information Exception code #1334652420 File /Users/thomas/Sites/Instances/scriptme.de/Deployment/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_Surf_Domain_Model_SimpleWorkflow.php line 67 Exception reference #20131102112739d6ce74Oooops :-)
Done reading the article. Here is my deployment config:
<? /** * Deployment configuration for the first static version of scriptme.de */ /** * This is provided by Surf when this deployment is running. It is the base object. * This is only here for getting some code completion in PhpStorm * * @var $deployment \TYPO3\Surf\Domain\Model\Deployment */ /** * First we define HOW we want to deploy. We need a workflow for that. * A said above, a workflow defines how a deployment works. Or in other words, which steps are necessary to successfully * deploy the given application. (Internally the steps are called stages). * * In this case, we use a "simple" workflow. It consist of the following stages: * * // Initialize directories etc. (first time deploy) * 'initialize', * // Local preparation of and packaging of application assets (code and files) * 'package', * // Transfer of application assets to the node * 'transfer', * // Update the application assets on the node * 'update', * * // Migrate (Doctrine, custom) * 'migrate', * // Prepare final release (e.g. warmup) * 'finalize', * // Smoke test * 'test', * // Do symlink to current release * 'switch', * // Delete temporary files or previous releases * 'cleanup' * * You can create your own workflows I guess. But I stick with this for now. */ $workflow = new \TYPO3\Surf\Domain\Model\SimpleWorkflow(); $deployment->setWorkflow($workflow); /** * Next step... * * WHAT do we want to deploy? This is defined by the application. * * This word "application" is a little misleading. At this point we don't have any application. On the other hand, * who delivers a single HTML file with a deployment system? So the wording makes sense for the things it's intended for. */ /** * The BaseApplication provides a Git checkout and a basic release directory structure. * */ $application = new \TYPO3\Surf\Application\BaseApplication('static-scriptme'); $application ->setOption('repositoryUrl', 'email@example.com:scriptme-de/static-website.git') ->setDeploymentPath('/var/www/www.scriptme.de/static-website'); $deployment->addApplication($application); /** * So we know the "how" and "what". Let's have a look at the WHERE. * * To do so, a node is needed. */ $node = new \TYPO3\Surf\Domain\Model\Node('production'); $node->setHostname('www.scriptme.de'); $application->addNode($node); ?>
Let's do a dry run of this
./flow surf:simulate static-scriptme-de Got exception "Deployment directory "/var/www/www.scriptme.de/static-website" does not exist on node production" rolling back.
That's easy enough to fix. Let's try again:
./flow surf:simulate static-scriptme-de Simulating static-scriptme-de (20131102114642) Stage initialize production (static-scriptme) typo3.surf:createdirectories production (static-scriptme) typo3.surf:generic:createDirectories Stage package Stage transfer production (static-scriptme) typo3.surf:gitCheckout Got exception "Could not retrieve sha1 of git branch "master"" rolling back. Rolling back TYPO3\Surf\Task\Generic\CreateDirectoriesTask Rolling back TYPO3\Surf\Task\CreateDirectoriesTask
Ooooh. Well this is a speciality of my setup. The Git server is on the same machine as where the Git command is running. I have to change the repositoryUrl in the application to localhost instead of git.scriptme.de. Let's see how this works now:
./flow surf:simulate static-scriptme-de Simulating static-scriptme-de (20131102114817) Stage initialize production (static-scriptme) typo3.surf:createdirectories production (static-scriptme) typo3.surf:generic:createDirectories Stage package Stage transfer production (static-scriptme) typo3.surf:gitCheckout production (static-scriptme) typo3.surf:generic:createSymlinks Stage update Stage migrate Stage finalize Stage test Stage switch production (static-scriptme) typo3.surf:symlinkrelease Node "production" would be live! Stage cleanup production (static-scriptme) typo3.surf:cleanupreleases
Well, I think we can call this a success.
Alright, for real now!
./flow surf:deploy static-scriptme-de
The folder static-website/releases/current/ now contains my website repository. Just as expected (hoped).
Alright, let's quickly change the link in my document root and we're golden for now.
thomas@imperator:/var/www/www.scriptme.de/www-data$ sudo unlink index.html thomas@imperator:/var/www/www.scriptme.de/www-data$ ln -s ../static-website/releases/current/index.html
Well, that wasn't too hard. Next stop... Get Neos running on my local machine.
To fix my deployment dilemma, I thought it would be a could idea that the first thing I should do is implementing deployment. Talking about deployment and TYPO3/Flow you pretty fast end up with Surf. A Flow package for deployment of, well I guess almost everything. It's really not bound to Flow and/or TYPO3 CMS. It's based on Flow and it brings some specialized tools for it of course.
So the obvious thing to do, at least for me, is to setup Surf and be happy right. I mean, come on, it's just a single file. How hard can it be?
The whole Flow project has quite a history by now. I can't tell you too much about it, just because I simply wasn't involved that much. But that is not the point of this anyway.
The thing is, if you work on such a complex project with many people over a certain amount of time, you eventually wind up with a lot of tools that are supposed to make your life easier. Basically I like this idea. In the end I am a developer and there are not many things that I can appreciate more than a shiny new software that automates boring and tedious tasks for me.
The downside of this is, that without even recognizing, you raise the first hurdle for everyone who is trying to step in. Even if the tools you introduce, where intended to do the oposite. That is kind of a dilemma I'm facing right now.
Flow is distributed via Composer, a package manager for PHP. This might be a good idea, but right now this is kind of a stone in my way, because if I want to do it "the right way", I have to learn composer first before I can distribute my website with TYPO3.Surf.
But maybe, I look at this all wrong. Maybe I shouldn't try to do it the right way and just do whatever I think is correct and fix whatever is not working well. Hm... Sounds like a lot of wasted time to me.
But wait, I think I just had an epiphany. All I need to do is to setup a flow with Surf and I use that stand alone without any connection to my website. Hmm...
Small sidenote: Putting the installation instructions for something into the documentation you can see as soon as you have installed the package is a little odd. I'm looking at you TYPO3.Surf! ;-)
And yes I know, that it will be visible on the website eventually. It will be right?
I got some nice feedback after releasing this page yesterday. I think that most people like the idea as much as I do.
I can't wait to get this a little more sophisticated than it is right now. :-)
By the way, I also made an improvement to the infrstructure yesterday. The very first version of the HTML file was uploaded via SCP to the server. Than I realized, that I had a lot of stupid typos on the site. So I had to fix that. Doing that directly on the server, felt a little too stupid in the year 2013. I also thought that it would be neat to have a history of this. So as a developer the solution was pretty clear.
I created a git repository and added my one page website to it. I will need many other git repositories later on anyway.
Of course, this solution only a fraction better than what I had before. I still have to log onto the server and do a git pull to do an update. But I have a history now and can do rollbacks in necessary.
my name is Thomas Hempel and if you are reading this, you probably know me in person. So I skip all this mambo-jumbo about me, where I'm coming from etc.
I want to come straight to the point of this page. What you see right now is plain old HTML. Really! I'm not kidding you. There was no CMS involved, no frameworks, no libraries or anything else. Man, this page doesn't even have CSS.
Actually I wrote this from the top of my head right into the text editor and uploaded it to the server.
So, you might ask yourself "Why would he do such a silly thing? Did he finally went over the edge? Dude, I've seen this coming for years!" - I can reassure (or disappoint) you that that is not the case! It's the opposite actually.
Still with me? Great!
So, this is an experiment. I will try to rebuild my website completely from scratch, and document it right here on the website while I'm building it..
I wanted to rebuild the site for years now, and I have the feeling, that now is a very very good time to actually do it. Let me explain.
I just came back from the T3CON13 in Stuttgart and it was a really great event.
The Neos team finally announced a release date for TYPO3 Neos, a new CMS based on a framework called TYPO3 Flow, which was created by basically the same team. So, it's a CMS with a foundation tailor made for it.
Sounds cool? No! Well I think it does.
Anyway, I know many of the guys from the team. Some I consider friends. With some of them I never spoke whatsoever. But I consider every single one of them incredibly smart. The are
insanely very dedicated to what they are doing. And I have huge respect for that!
I'm not smart enough to be part of that team and help them. At least not right now. But I want to help and I want to be part of it.
When talking to other people at the conference there was one thing very very clear. We have to start using this product right now!
On the one hand to give real-world feedback to the team. And secondly to be ahead of the competition with a product that was build by our community on one way or another.
So this is what's hopefully gonna happen here. Feel free to follow me along the way. I'm pretty sure it's going to be a hell of ride with lots of ups and lots of downs.
But I'm pretty certain that it will be a fun adventure for everyone.
Thank you for reading and I hope to see you soon back here.
P.S.: There is no commenting function yet (static HTML, remember?), so feel free to send me an e-mail at firstname.lastname@example.org if you have any sort of question or remark.
P.P.S.: Copying files to a server via FTP sucks. Next thing coming up: Deployment.
P.P.P.S: This page is 100% responsive and I did nothing to achieve that. Am I a web developer now?
If you have any questions, please let me know. There are several ways to reach me: