Mapbender Error when initializing with my MapProxyWMS - php

I am currently working on integrating a MapProxy WMS into my Mapbender applications.
Adding the MapProxy as a datasource works fine. Mapbender recognizes all layers and metadata.
Additionaly I can add the MapProxy WMS to an application, but when I start that application, I get the following error message on the top right:
Additionally this error "deactivates" the "wms-layer-tree" on the left (the menu where the user can activate or deactivate wms sources"
In the MapBender log, I can see the following:
[2021-02-02 14:17:22] request.INFO: Matched route "mapbender_manager_repository_view". {"route_parameters":{"_controller":"Mapbender\\ManagerBundle\\Controller\\RepositoryController::viewAction","sourceId":"225","_route":"mapbender_manager_repository_view"},"request_uri":"https://geoportal2.intra.swrag.de/mapbender/manager/repository/source/225"} []
[2021-02-02 14:17:22] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "Not Found" at /var/www/mapbender/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php line 251 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): Not Found at /var/www/mapbender/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php:251)"} []
I guess that's the Error for my MapProxy WMS because of the timestamp and because of the "sourceID":"225", which is the ID of my MapProxy WMS.
Also, if I used my WMS in a QGIS project it works fine.
Feel free to ask, if I missed explaining something. Any help is appreciated. Stay safe!

Okay.. I found the solution.
While testing the MapProxy WMS I wanted to disable it by default when starting the application.
Sadly I chose the wrong option, which let to crashing the WMS-Layer-Tree.
So if you have the same problem: don't deactivate the first option!

Related

Unable to understand the exception in Prod, while the same functionality works in Dev mode

Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "" at /var/www/<projectId>/src/oro/platform/src/Oro/Bundle/FeatureToggleBundle/EventListener/RequestListener.php line 33
And the trace as follows
{/var/www/<projectId>/src/oro/platform/src/Oro/Bundle/FeatureToggleBundle/EventListener/RequestListener.php:33 {▼
Oro\Bundle\FeatureToggleBundle\EventListener\RequestListener->onRequest(GetResponseEvent $event) …
› if ($event->isMasterRequest()) {
› throw new NotFoundHttpException();
› }
}
/var/www/<projectId>/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php:126 {}
And the request for offer functionality, works perfectly fine in Dev but not in Prod.
I have ensured that the files are updated and also made sure there is nothing that is amiss.
Checked DB migrations and ensured that all changes are intact
The fact that the functionality works fine on Dev is strange and When I do <App_URL>/index_dev.php/customer/request/create on the 500 Internal error does not show any error but infact loads the RFQ page perfectly fine and intact.
Any suggestions to debug this error or an understanding of What may be going wrong ?
According to the error message and the stack trace, you have the feature enabled in dev but disabled in a prod environment. Usually, it happens because of the cache.
So the first suggestion is to remove the file cache manually, using rm -rf var/cache/*, and if you are using Redis, flush the redis database as well. The cache:clear command is not always reliable.
You say that the exception is thrown only in prod, but the error stack-trace has wrappers, that must be used only with the debug=true option in the AppKernel. Please, make sure, you haven't customized the index.php file to enable debug, as it is unsecure, and make sure your web-server virtual host is configured to use index.php, not index_dev.php.
The exception comes from the feature toggle bundle. As the last resort, you can check the documentation, on how the feature is implemented, and debug the listener from the trace (src/oro/platform/src/Oro/Bundle/FeatureToggleBundle/EventListener/RequestListener), to see, where the value comes from.

Silverstripe content block module error

I am using Silverstripe 3.1 version and for a week I am trying to add a content block module to it. But every time I add module I get some errors. Now I am trying to add this one.
https://github.com/bummzack/page-blocks
Installation is clear, I edit the necessary files, add it to my page.php and when I make new page and try to add a text block to it I get error -
Error at line 761 of /...wwwroot/framework/core/Object.php
Ok then I try to add other module , it is this - > https://github.com/NobrainerWeb/Silverstripe-Content-Blocks
When I add this module, the install is clean, no error in dev mod, db added perfectly. I see all block menus in admin panel, bet when I try to add blocks I get internal server error.
Can someone please help me?
I am despered. Sorry for bad English language, not my native.
Error;
[User Error] Uncaught Exception: Object->__call(): the method 'isnew' does not exist on 'TextBlock'
GET /admin/pages/edit/EditForm/field/Blocks/add-multi-class/TextBlock
Line 761 in /var/www/vhosts/erlanda/erlanda/wwwroot/framework/core/Object.php

How to debug Laravel 5 projects?

I ran command
php artisan optimize
and changed debug settings in app.php file to be
'debug' => 'true',
and added 'everyone' to have full access over 'storage' folder. I don't know what else I can do to let debugger work in my Laravel 5 project.
I'm stuck with 'Whoops, looks like something went wrong' message.
Any Ideas??
The debug => true will just show you the full error stack when you hit an error with your app. It doesn't give metrics and statistics. If you are looking for that kind of information check out the article here:
https://laravel-news.com/2015/02/laravel-debugbar/
The error you are receiving is a general error, likely server-side configuration. Without any information on your setup it will be pretty hard to determine what your issue is. Based upon your question and comments to others responses I have a couple of things for you.
You stated "I don't know what else I can do to let debugger work in my Laravel 5 project". Laravel 5 doesn't have a native debugger any more which I imagine is why your page just shows "Whoops, looks like something went wrong". Your statement would indicate that you have a debugger, so which are you trying to use, or was that statement incorrect?
You stated that you changed the debug settings the app.php file. Is there a reason why you changed this in app.php? The debug setting by default is 'debug' => env('APP_DEBUG') which is sufficient in most cases. You should have a .env file in the root of your project (created automatically if you did a composer create-project, if not you need to copy .env.example to .env on your own). The .env file will enable debug for you as there is a line that states APP_DEBUG=true.
Jesse Schutt gave great information in his response above (which I recommend upvoting), including a link to a debug bar that is compatible with L5. Yet again you are stating that you are satisfied with your error stack which implies that you actually have one. If you were satisfied with it, you would have no need to have posted here as you would already have more information on your error. If you are assuming that the filp/whoops is in l5 still and that's what you want you'll have to re-enable it. Follow the instructions at http://mattstauffer.co/blog/bringing-whoops-back-to-laravel-5

(403) Access Not Configured when adding event to calendar

Today I started to get this error upon adding new events to calendar:
Fatal error: Uncaught exception 'apiServiceException' with message
'Error calling POST https://www.googleapis.com/calendar/v3/
calendars/[cal-id]#group.calendar.google.com/events?alt=json&key=[dev-key]:
(403) Access Not Configured' in /[...]/src/io/apiREST.php:86
Stack trace: #0 /[...]/src/io/apiREST.php(56): apiREST::decodeHttpResponse(Object(apiHttpRequest))
#1 /[...]/src/service/apiServiceResource.php(148): apiREST::execute(Object(apiServiceRequest)) #2 /[...]/src/contrib/apiCalendarService.php(472):
apiServiceResource->__call('insert', Array) #3 /[...]/index.php(160): EventsServiceResource->insert('[cal-id-part]...',
Object(Ev in /[...]/src/io/apiREST.php on line 86
It worked perfectly till now and I didn't change anything in code.
I had a similar problem accessing Google Analytics data with PHP. I fixed it by making sure the Analytics service was turned on for my project in my API console: https://code.google.com/apis/console/.
You may have to turn on the calendar service. See the link below for further explanation when someone had an issue with the translation service:
Translation api has stopped working
Don't know if this will help someone.
I had the same error and I had tried everything. Then I removed "developer_key" from config.php and it worked. Please note I was using Service Account https://developers.google.com/accounts/docs/OAuth2ServiceAccount
Well, they released new version and that what apparently caused errors. Got the newest version now and it works great once again.
Don't know if this will help someone, either.
It may also help to go to the respective calendar-settings page in your Google Account, edit something trivial and explicitly save again, (or re-save once more to set back to the old settings). Sometimes the google servers are a bit hesitant to accept any new settings, especially the "Sharing " settings. Check which of your service accounts have permission levels "can edit" , or "is owner" .

Call to undefined method sfApplyApplyForm::isCaptchaEnabled

I’m getting a funny error after I deploy a fully working symfony project to my web host (hostgator). Everything works fine on my localhost.
Here’s the error:
500 | Internal Server Error | sfException
Call to undefined method sfApplyApplyForm::isCaptchaEnabled.
Here’s what I’m using:
Symfony 1.4
Doctrine 2.0
sfForkedDoctrineApplyPlugin - for
registering new users with:
sfDoctrineGuardPlugin - for
authentication
I get the error when I click the “Register” link.
Obviously, the form is Captcha enabled. I’ve tried turning it off in config/app settings with no change in error. I’ve also confirmed that my public and private keys are correct and registered... I’ve even updated them with no change in error msg.
A search on Google brings up nothing helpful.
Any ideas about where to begin troubleshooting?
To correct this problem I just copied the isCaptiaEnabled() method from the plugin to the model class where I embedded the plugin form. I believe I had to also copy a couple of other methods over as well. But as soon as I did that, the errors never came back.

Categories