Error when trying to make a custom template

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

Error when trying to make a custom template

useher
Hello group!

I am trying to create a own template for mapbender3 v 3.0.5.3. At the moment i have downloaded the sample code and go through the description. The tree for the DemoTemplate is in $INSTALL_DIR/mapbender/src/ on the same level as the Mapbender-Dir. All files and dirs are owned by the webserver-user.

When i get to this point in the tutorial:
app/console assets:install web --symlink --relative
this error appears:

PHP Fatal error: Class 'Workshop\DemoBundle\WorkshopDemoBundle' not found in /srv/www/htdocs/mapbender3-3.0.5.3/app/AppKernel.php on line 40
This is the entry for the new class, if i comment the line out all work out.

In the tutorial this dir /web/assets/WorkshopDemoBundle__demo_fullscreen__css.css is mentioned
As this does not exist i created it by hand.

It would be great if someone has a hint whats going wrong here.

Thank you in advance
Uwe Seher


_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: Error when trying to make a custom template

Andreas Schmitz-2
Uwe Seher wrote:

Hi,

> I am trying to create a own template for mapbender3 v 3.0.5.3. At the
> moment i have downloaded the sample code and go through the description.
> The tree for the DemoTemplate is in $INSTALL_DIR/mapbender/src/ on the same
> level as the Mapbender-Dir. All files and dirs are owned by the
> webserver-user.
>
> When i get to this point in the tutorial:
>
> app/console assets:install web --symlink --relative
>
> this error appears:
>
> PHP Fatal error:  Class 'Workshop\DemoBundle\WorkshopDemoBundle' not
> found in /srv/www/htdocs/mapbender3-3.0.5.3/app/AppKernel.php on line
> 40
this means that you don't have the WorkshopDemoBundle class. You can
check what files you have in mapbender/src/Workshop/DemoBundle (you
should have WorkshopDemoBundle.php) and if the class is correctly
named (namespace Workshop\DemoBundle; and class WorkshopDemoBundle
{...}).

Best regards, Andreas

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Error when trying to make a custom template

useher
Hello Andreas!

The full path is
/srv/www/htdocs/intranet/mapbender3/mapbender/src/Workshop/DemoBundle/WorkshopDemoBundle.php

I checked owner and rights and everything seems to be like in the Mapbender-Dir on the same level.
The classfile itself is unchanged direct from the download.


Regards, Uwe


2016-06-13 14:47 GMT+02:00 Andreas Schmitz <[hidden email]>:
Uwe Seher wrote:

Hi,

> I am trying to create a own template for mapbender3 v 3.0.5.3. At the
> moment i have downloaded the sample code and go through the description.
> The tree for the DemoTemplate is in $INSTALL_DIR/mapbender/src/ on the same
> level as the Mapbender-Dir. All files and dirs are owned by the
> webserver-user.
>
> When i get to this point in the tutorial:
>
> app/console assets:install web --symlink --relative
>
> this error appears:
>
> PHP Fatal error:  Class 'Workshop\DemoBundle\WorkshopDemoBundle' not
> found in /srv/www/htdocs/mapbender3-3.0.5.3/app/AppKernel.php on line
> 40

this means that you don't have the WorkshopDemoBundle class. You can
check what files you have in mapbender/src/Workshop/DemoBundle (you
should have WorkshopDemoBundle.php) and if the class is correctly
named (namespace Workshop\DemoBundle; and class WorkshopDemoBundle
{...}).

Best regards, Andreas

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users


_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: Error when trying to make a custom template

Andreas Schmitz-2
Uwe Seher wrote:

Hi,

> The full path is
> /srv/www/htdocs/intranet/mapbender3/mapbender/src/Workshop/DemoBundle/WorkshopDemoBundle.php
>
> I checked owner and rights and everything seems to be like in the
> Mapbender-Dir on the same level.
> The classfile itself is unchanged direct from the download.

perhaps the autoloader has not been dumped yet. Try installing
composer as outlined in
http://doc.mapbender3.org/en/book/installation/installation_git.html#composer
Then try

composer dump-autoload

After that, the system should find the class.

Best regards, Andreas

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Error when trying to make a custom template

useher
Hi!
Seem to take me a step further, thank you.

Ok, at the end the Workshop dir has been placed in the wrong directory.
As i placed it in <installdir>/src and not in <installdir>/mapbender/src it worked perfect.

Thank you very much for your help!

Best regards, Uwe 



2016-06-13 15:45 GMT+02:00 Andreas Schmitz <[hidden email]>:
Uwe Seher wrote:

Hi,

> The full path is
> /srv/www/htdocs/intranet/mapbender3/mapbender/src/Workshop/DemoBundle/WorkshopDemoBundle.php
>
> I checked owner and rights and everything seems to be like in the
> Mapbender-Dir on the same level.
> The classfile itself is unchanged direct from the download.

perhaps the autoloader has not been dumped yet. Try installing
composer as outlined in
http://doc.mapbender3.org/en/book/installation/installation_git.html#composer
Then try

composer dump-autoload

After that, the system should find the class.

Best regards, Andreas

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users


_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users