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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:27:21
Script start
Timing: Jan 18 2025 11:27:21
Module start 'layout'
Timing: Jan 18 2025 11:27:21
Module start 'content'
Timing: Jan 18 2025 11:27:22
Module end 'content'
Timing: Jan 18 2025 11:27:22
Script end

Main resources:

Total runtime1.2381 sec
Peak memory usage4,096.0000 KB
Database Queries74

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 587.9063152.6250
Module start 'layout' 0.00510.0026 740.531339.4453
Module start 'content' 0.00771.2291 779.9766652.9844
Module end 'content' 1.23680.0012 1,432.960920.1641
Script end 1.2381  1,453.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2514160.0002
Check MTime0.00140.1110160.0001
Mysql Total
Database connection0.00080.064510.0008
Mysqli_queries1.160493.7217740.0157
Looping result0.00060.0515720.0000
Template Total1.210597.820.6052
Template load0.00180.141820.0009
Template processing1.208797.623520.6043
Template load and register function0.00010.009610.0001
states
state_id_array0.00070.054810.0007
state_identifier_array0.00090.073920.0005
Override
Cache load0.00180.14321200.0000
Sytem overhead
Fetch class attribute can translate value0.00050.038930.0002
Fetch class attribute name0.00100.077490.0001
XML
Image XML parsing0.00100.077630.0003
class_abstraction
Instantiating content class attribute0.00000.0017100.0000
General
dbfile0.00070.0588160.0000
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
17content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
22content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 51
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs