Forums / General / Problem when following tutorial

Problem when following tutorial

Author Message

David Barker

Sunday 27 July 2003 9:00:10 am

Hi,
I re-read the tutorial and have been working through it (making the book store) and I have just created the 'Book' class.
I added the info for the book and made the line_class_14.tpl etc. but when I go to view the page , I get the overall page layout that I should 9from pagelayout.tpl), but where the book should be, I get 'Unavailable: The object is not available'.

I've checked all the paths to the templates etc. but I don't know what the problem is. Could anyone advise me? (Sorry to be a nuisance again!)

Dave

P.S. I understand the general eZpublish idea more now but I'm still a little confused with this (and it could be the answer to the above problem)...

I have index.php pointing to my book page automatically, but how does eZpublish know that I want the things in the 'Books' category shown?

David Barker

Sunday 27 July 2003 9:15:56 am

OK... I'm guessing I need to change the IndexPage value to fix my problem?
But I just changed it to /content/view/full/101/ and now I get the same site design, but with all the admin tools - not the actual content!?

It's like the tree view of my folders instead of the content :(

Dave

David Barker

Monday 28 July 2003 3:35:28 am

Hey, I just turned on the debug and this is what it said...

Warning: eZModuleOperationInfo::execute Jul 28 2003 11:32:41
Missing main operation memento for key: a14df11fdabebf4395158af1a29da003

Warning: PHP Jul 28 2003 11:32:41
Undefined index: object in /pub/home/dbarker5/htdocs/kernel/content/view.php on line 171

Error: eZTSTranslator::load Jul 28 2003 11:32:41
Could not load translation file: share/translations/eng-US/translation.ts

Warning: ezi18n Jul 28 2003 11:32:41
No translation for file(translation.ts) in context(design/standard/error/kernel): 'Unavailable'

Warning: ezi18n Jul 28 2003 11:32:41
No translation for file(translation.ts) in context(design/standard/error/kernel): 'The object is not available.'

Warning: ezi18n Jul 28 2003 11:32:41
No translation for file(translation.ts) in context(kernel/error): 'Error'

Pleaseee can anyone help?

Dave

Alex Jones

Monday 28 July 2003 1:36:38 pm

David, what version of eZ publish are you using? The override template settup changed from 3.0 to 3.1. From what you describe you are using the old style, if you are using 3.1 that would not work. Check out http://www.ez.no/developer/ez_publish_3/documentation/customization/custom_design/override_templates for more information.

If this is the case, it sounds like eZ systems needs to update the tutorial.

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

David Barker

Monday 28 July 2003 2:13:21 pm

Hey,
Thanks! I still got stuck so I'm gonna copy the Demo site to my own folder and work from that. Wow - is it just me that finds eZpublish not so easy! lol.

Thanks again!

Dave

P.S. I'm using 3.1

Alex Jones

Monday 28 July 2003 2:25:04 pm

Yeah, eZ publish has a steep learning curve. I figure the "eZ" applies to what the site editors will have after I've learned all of this and implemented a site. :)

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

David Barker

Monday 28 July 2003 4:23:40 pm

hehe. It's wierd! I kinda get some of the more advanced concepts (like classes) and I'm learning the general stuff as I go along. If it wasn't eZpublish, I would probably have given up already! But I know it is exactly what I need and is really powerful so I persued it!

I'm glad now! I just have to make the templates now (my job tomorrow hehe)...

Dave

Dave Taylor

Wednesday 30 July 2003 7:01:05 am

Using the tutorial to create a new site 'mybookstore.com'

First of all I have run the windows installer.
The tutorial give the example of using hostname so I have put an entry in my host file:
127.0.0.1 ww.mybookstore.com localhost admin.bookstore.com
(I can ping www.mybookstore.com with reply from 127.0.0.1)
I have then created a new mysql database.
C:\ez\mysql\bin\mysql.exe
mysql> create database bookstore;
Query OK, 1 row affected (0.04 sec)
mysql> grant all on bookstore.* to bookstore@localhost identified by 'bookstore';
Query OK, 0 rows affected (0.45 sec)
mysql> exit
Bye

In the C:\ez\ezpublish\settings\siteaccess folder there are sub folders called admin, demo, sdk and user. I have renamed these to org_admin, org_demo, org_sdk and org_user.
I have then created folders admin and www
I have also created the folder C:\ez\ezpublish\settings\override

I have then set- up the C:\ez\ezpublish\settings\site.ini file and made the following changes:
[SiteAccessSettings]
CheckValidity=true

I have then set-up the site via IE. http://127.0.0.1/index.php
System Check - No problems
Database set-up
Servername localhost
Socket
Databasename bookstore
Username bookstore
Password ********* (bookstore)
Confirm password ********* (bookstore)

The database was successfully initialised (demo data not installed)
Email Settings left blank
Site Details - Title - Bookstore - URL - www.bookstore.com

4 files created in C:\ez\ezpublish\settings\override
i18n.ini.append.php image.ini.append.php setup.ini.append.php site.ini.append.php

The tutorial advises that you need to make changes in site.ini but I have changed site.ini.append.php
[SiteAccessSettings]
MatchOrder=host
HostMatchRegexp=^(.+)\.mybookstore\.com$
HostMatchSubtextPost=\.mybookstore\.com

I have then created folder/file C:\ez\ezpublish\settings\siteaccess\admin\site.ini.append with settings:
[SiteSettings]
LoginPage=custom
[SiteAccessSettings]
RequireUserLogin=true

And also C:\ez\ezpublish\settings\siteaccess\www\site.ini.append with the setting:
[DesignSettings]
SiteDesign=mybookstore
[SiteAccessSettings]
RequireUserLogin=false

I have then created folder/file C:\ez\ezpublish\design\mybookstore\templates\pagelayout.tpl
With the contents (from the tutorial):

If I try to access http://admin.mybookstore.com I get the page cannot be displayed.
So I logged into the site http://127.0.0.1/index.php using admin and publish
Went to setup > content and created a new class called Book as per the tutorial
(ID 14)

Created a folder in root called Books. Clicked on Books and created a new Book and sent for publishing.

Created a template line_class_14.tpl and full_class_14.tpl in C:\ez\ezpublish\design\mybookstore\override\templates\node\view

If I access admin.mybookstore.com/index.php I am taken to the login page and can login using admin - publish
I also get this if I access www.mybookstore.com/index.php

This appears to be directly related to DefaultAccess entry in the file
In C:\ez\ezpublish\settings\override\site.ini.append.php
If it is set to admin I get the login page for both URLs and if it is set to www I get to the site without logging in but cannot see the book data I inputted.
I also get a link for Default object view. Click to create a custom template ??

So, can anyone help me with what's wrong in the set-up?

Regards

DT