[Mapbender-users] Difference in app.php and app_dev.php?
Teresa Graßl
teresagrassl91 at gmail.com
Wed Sep 27 05:48:43 PDT 2017
Hello,
I´m confused about two parts of MapBender. I created a new application
under *http://localhost/mapbender3/manager/applications
<http://localhost/mapbender3/manager/applications>.* When I add the element
digitizer (please see added e-mail) in my content-part of layouts and
connect my database, following error occurs by starting the application:
*Feature API query error."<!DOCTYPE html>\n<html>\n <head>\n <meta
charset=\"UTF-8\" />\n <title>An Error Occurred: Internal Server
Error</title>\n </head>\n <body>\n <h1>Oops! An Error Occurred</h1>\n
<h2>The server returned a \"500 Internal Server Error\".</h2>\n\n <div>\n
Something is broken. Please let us know what you were doing when this error
occurred.\n We will fix it as soon as possible. Sorry for any inconvenience
caused.\n </div>\n </body>\n</html>\n"*
I read in a forum comment, that one solution is to start the application in
the developement mode under
*http://localhost/mapbender3/app_dev.php/manager/applications
<http://localhost/mapbender3/app_dev.php/manager/applications>*. By doing
this, the element digitizer works fine and no errors occur by starting the
application. But now: by editing any element "button" (layouts -> toolbar)
an error occurs:* internal server error*. Other elements in the toolbar as
well as in the content and footer can by edited without problems. Only the
element "button" does not work. The tricky thing is, that working
under *http://localhost/mapbender3/manager/applications
<http://localhost/mapbender3/manager/applications>* all elements "button"
are working fine and are easily editable.
For the use of my application, I don´t want to open it in the developement
mode! Do you know, why the both modes are acting so differnt? Do I have to
do special or additional configurations? Which mode is best for using it
and modifying an application?
Thank you so much in advance!
Best regards
Teresa
---------- Forwarded message ----------
From: Teresa Graßl <teresagrassl91 at gmail.com>
Date: 2017-09-22 16:01 GMT+02:00
Subject: Re: [Mapbender-users] Mapbender don´t show map
To: Mapbender User List <mapbender_users at lists.osgeo.org>
Hello Charlotte,
maybe you can help me again.
I´ve added the element "digitizer" and entered following yml-file:
*bohrdaten: label: Punkt Digitalisierung inlineSearch: true
maxResults: 500 featureType: connection: Bohrpunkte_NP
table: bohrdaten uniqueId: id geomType: point
geomField: geom srid: 4326 openFormAfterEdit: true
zoomScaleDenominator: 500 allowEditData: true allowDelete: true
allowDigitize: true useContextMenu: true useCancelButton: true
toolset: - type: drawPoint - type: moveFeature
popup: title: Editieren Bohrpunkte width: 500px
searchType: currentExtent tableFields: id: {label: Nr.}
projektnummer: {label: Projekt} adresse: {label: Adresse}
beschreibung: {label: Beschreibung} datum: {label: Datum}
gw_flurabstand: {label: GW-Flurabstand [m]} gw_maechtigkeit: {label:
GW-Mächtigkeit [m]} gok: {label: GOK [m ü. NN]} gwo: {label:
GWO [m ü. NN]} tertiaer_ok: {label: Tertiär-OK [m ü. NN]}
erschliessung: {label: Erschließung} nutzung: {label: Nutzung}
styles: default: strokeWidth: 2 strokeColor:
'#0e6a9e' fillColor: '#1289CD' fillOpacity:
1 fillWidth: 2 pointRadius: 10
select: strokeWidth: 3 strokeColor:
'#0e6a9e' fillOpacity: 0.7 pointRadius: 10
formItems: - type: tabs children: - type:
form title: Basisinformationen css: {padding:
10px} children: - type: label
title: Hier kannst du einen neuen Bohrpunkt erfassen! -
type: input title: Projekt mandatory:
true name: projektnummer mandatoryText:
Hoppla. Unvollständige Eingabe! infoText: "Bitte gib eine
Projektnummer an!" placeholder: "z.B. 1234 oder
1234-1" - type: textArea title:
Adresse name: adresse rows:
2 - type: select title:
Erschließung name: erschliessung
multiple: false options: {1: Rammsondierung, 2:
Kleinbohrung, 3: Bohrung} infoText: "Hier kann angegeben
werden, wie der Bohrpunkt erschlossen wurde" - type:
select title: Nutzung name:
nutzung multiple: false options:
{1:Erkundung, 2:GWM, 3:Geothermie} infoText: "Hier kann
angegeben werden, wie der Bohrpunkt genutzt wird" - type:
input title: Beschreibung name:
beschreibung mandatory: false
placeholder: "Hier können zusätzliche Informationen angegeben
werden." - type: date title:
Datum name: datum placeholder: "z.B.
01.01.2017" dateFormat: dd.mm.yy
infoText: "Das Datum wird im Format dd.mm.yy angegeben." - type:
form title: Details css: {padding:
10px} children: - type: label
title: Bitte gib hier weitere Informationen zum Bohrpunkt
an! - type: fieldSet
children: - type: input
title: GW-Flurabstand [m] name:
gw_flurabstand css: {width:
33%} - type: input title:
GW-Mächtigkeit [m] name:
gw_maechtigkeit css: {width:
33%} - type: input title: GWO
[m ü. NN] name: gwo css:
{width: 33%} - type: fieldSet
children: - type: input
title: GOK [m ü. NN] name:
gok css: {width: 50%} - type:
input title: Tertiär-OK [m ü. NN bzw. m unter
GOK] name: tertiaer_ok css:
{width: 50%}*
I added two database-connection to my config.yml and my parameters.yml
(like explained in https://doc.mapbender3.org/de/book/database.html):
1) in the config.yml
*doctrine: dbal: default_connection: default
connections: # Datenbankverbindung default
default: driver: %database_driver%
host: %database_host% port:
%database_port% dbname: %database_name%
path: %database_path% user:
%database_user% password: %database_password%
persistent: true charset: UTF8 logging:
%kernel.debug% profiling: %kernel.debug% #
Datenbankverbindung Bohrpunkte_NP Bohrpunkte_NP:
driver: %database2_driver% host:
%database2_host% port: %database2_port%
dbname: %database2_name% path:
%database2_path% user: %database2_user%
password: %database2_password% persistent:
true charset: UTF8 logging:
%kernel.debug% profiling: %kernel.debug%*
2) In the parameters.yml
*parameters: # Datenbankverbindugn default database_driver:
pdo_pgsql database_host: localhost database_port: 5432
database_name: mapbender3 database_path: ~ database_user:
postgres database_password: **** #Datenbankverbindung
Bohrpunkte_NP database2_driver: pdo_pgsql database2_host:
localhost database2_port: 5432 database2_name:
Bohrpunkte_NP database2_path: ~ database2_user: postgres
database2_password: **** mailer_transport: smtp
mailer_host: localhost mailer_user: ~ mailer_password:
~*
After updating and return to my application following error occured:
*Feature API query error."<!DOCTYPE html>\n<html>\n <head>\n <meta
charset=\"UTF-8\" />\n <title>An Error Occurred: Internal Server
Error</title>\n </head>\n <body>\n <h1>Oops! An Error Occurred</h1>\n
<h2>The server returned a \"500 Internal Server Error\".</h2>\n\n <div>\n
Something is broken. Please let us know what you were doing when this error
occurred.\n We will fix it as soon as possible. Sorry for any inconvenience
caused.\n </div>\n </body>\n</html>\n"*
When I import my application in the develover environment
*http://localhost/mapbender3/app_dev.php/application/bp
<http://localhost/mapbender3/app_dev.php/application/bp>* and open my
application, everything´s working (no error). So I´m confused, why in the
app_dev.php it works, but not at the frontend
*http://localhost/mapbender3/application/bp
<http://localhost/mapbender3/application/bp>*? Do I have to do special oder
additional configurations?
Thank you in advance and have a nice weekend
Cheers,
Teresa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20170927/b7f8bfff/attachment-0001.html>
More information about the Mapbender_users
mailing list