User Guide with 2.0.0RC2 - white page

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

User Guide with 2.0.0RC2 - white page

Ralf Eggert
Hi,

I am working my way through the user guide and got stuck on the database
and model part:

http://zf2.readthedocs.org/en/latest/user-guide/database-and-models.html

I added all the files and made all the changes of this page. But when I
want to show the album list. I get a white page.

So I wrapped a try {} catch {} block around the call of

  Zend\Mvc\Application::init(...)->run()

in the public\index.php but I still get a white page with no errors shown.

Then I figured out, that deleting the content from the file

  config/autoload/global.php

throws an Zend\ServiceManager\Exception\ServiceNotFoundException with
the message

  Zend\ServiceManager\ServiceManager::get was unable to fetch or create
  an instance for Zend\Db\Adapter\Adapter

When I clear the 'db' entry from

  config/autoload/global.php

and leave the 'service_manager' entry an
Zend\ServiceManager\Exception\ServiceNotCreatedException is thrown with
the message

  An exception was raised while creating "Album\Model\AlbumTable"; no
  instance returned

I created a new database zf2start with user zf2start and password
zf2start and I am able to login to that database directly. So the
database settings must be correct.

I feel lost. Please advise.

Thanks, Ralf

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: User Guide with 2.0.0RC2 - white page

Ralf Eggert
Hi again,

I am still not any step further. Blank page with no exception or error
shown. I also feel a bit lost with the documentation since I don't know
where to find the configuration part for showing exceptions.

Is there any throwExceptions() method like in the front controller of
ZF1? Or can I configure this within the application.config.php file?

Where in the ZF2 is the simplicity and the ease-of-use part from ZF1 gone?

Best regards,

Ralf

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: User Guide with 2.0.0RC2 - white page

Ralf Eggert
Hi again,

I finally fixed the issue with the help of the apache error log. I
missed the

  use Album\Model\AlbumTable;

line, which has to be added to the module/Album/Module.php file.

Thanks and best regards,

Ralf


--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

RE: User Guide with 2.0.0RC2 - white page

BullfrogBlues





> Date: Sat, 4 Aug 2012 18:27:08 +0200
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [fw-general] User Guide with 2.0.0RC2 - white page
>
> Hi again,
>
> I finally fixed the issue with the help of the apache error log. I
> missed the
>
>   use Album\Model\AlbumTable;
>
> line, which has to be added to the module/Album/Module.php file.
>
> Thanks and best regards,
>
> Ralf
>
>
> --
> List: [hidden email]
> Info: http://framework.zend.com/archives
> Unsubscribe: [hidden email]
>
>


I missed the use statement too and got an exception that AlbumTable could not be found. It was easy to fix.

Is there any way for the docs to better highlight new code blocks? The problem with the above was that 2 code blocks are added but they're seperated by an existing one.


 
     
Reply | Threaded
Open this post in threaded view
|

Re: User Guide with 2.0.0RC2 - white page

weierophinney
Administrator
-- Gerry - <[hidden email]> wrote
(on Saturday, 04 August 2012, 07:49 PM +0100):
> Is there any way for the docs to better highlight new code blocks? The
> problem with the above was that 2 code blocks are added but they're
> seperated by an existing one.

I'm open to suggestions. The problem currently is that if you're in a
code-block in the docs, you can't apply other markup. (This was true of
DocBook as well). I tried to highlight such lines with comments, but I'm
sure I missed a few -- and I'm not positive it's the best way to do so.

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: User Guide with 2.0.0RC2 - white page

Ralf Eggert
Hi Matthew,

> I'm open to suggestions. The problem currently is that if you're in a
> code-block in the docs, you can't apply other markup. (This was true of
> DocBook as well). I tried to highlight such lines with comments, but I'm
> sure I missed a few -- and I'm not positive it's the best way to do so.

Maybe just split it into 2 code blocks? I think others might run into
the same problem. Or could you comment with /* */ to highlight stuff?

Best regards,

Ralf


--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]