Using GeoPHP in custom Form

Hi Forum,

i want to use the geoPHP library in a custom form, i´ve installed the lib with the geofield. Now i added:

use GeoPHP\GeoPHP;

and in my validateForm:

public function validateForm(array &$form, FormStateInterface $form_state) {
		$geom = \geoPHP::load('MULTILINESTRING((10 10,20 20,10 40))','wkt');
...

but i get the errorm that the  Error: Class 'geoPHP' not found. For which keywords i have to google?

best regards

Andy

Need help with a simple custom service with form builder - You have requested a non-existent service

Hi Guys,

i am trying to make simple custom services with dependency injunction + ajax form. when i am trying to include custom service to my form builder class with help of dependency injunction, i am getting the following error. can you any one help me. i am new for Drupal.

Error:

Updating from D7 to D8.5.6 problems

I tried to follow https://www.drupal.org/docs/8/upgrade/upgrade-using-web-browser#pre-upgr...

But after I enter the database info, the (correct) name of the database is in pink and I get a message

Resolve all issues below to continue the upgrade.

A bundle was provided but the entity type (user) is not bundleable

Generic IP block

Hi all,

I'm flooded by an chinese IP, even if HoneyPot is installed. They send me 500 forms submissions every night since a couple of week.

I tried to configurate the ban module but it doesn't work, telling me the 10.173.5.24 IP is a generic one and so, can't block it.

Any clue ?

I'm on D8, D8.5 in the next weeks.

Can I handle this through a module (easier solution) or something else ? It seems I can manage this with the htaccess but I would like not to have to modify it.

Thank's for you help.

MP93

Twig variable name for Custom block description

Hi, 

I can´t found twig variable name for custom block description (title / label of my custom block for block--blockname.html.twig template). I can read all variables {{content.body}} {{content.filed_custom}} but no title.

When I use {{label}}, I see label of all custom blocks type, no right one block.

I see this variable in KINT, but I tested {{content.info}} {{content.info}} {{content['#block_content'].0.info}} {{content['#block_content'].info}} and see empty variable or error.

Thank you very much for help.

Karaya

Delete the automatically created contact page

Hi,

I'm trying to do something that sounds theorically basic but actually pretty complex to accomplish.

I have created a contact form and apparently it creates automatically a contact page (how? why? where?), it looks like it's strictly impossible to add content other than the form on that page as the page is not accessible, from nowhere. So my plan was to :

- Delete that contact page : but where/how can I do that?

- Create another page called CONTACT (content > add content) and add the form to it

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x