Receiving this fault when clicking a button that submits a course in an ajax modal.

Proposed solution:

Calculation this.url = ''; to line 402 in core/misc/ajax.js

Not sure if this will crusade an outcome further down the line simply information technology stops the error from actualization in my panel.

Attached are errors and lawmaking locations.

Comment File Size Author
#24 2922677-24.patch 761 bytes ranjith_kumar_k_u
  • 9.2.x:
  • PHP 7.3 & MySQL 5.7 28,648 pass
#21 2922677-21.patch one.07 KB sja112
  • nine.2.10:
  • PHP 7.iii & MySQL five.7 Custom Commands Failed
  • 9.3.10:
  • PHP 7.4 & MySQL 5.seven Custom Commands Failed
#17 reroll_diff_2922677_8-eleven.txt 1.09 KB ankithashetty
#17 2922677-17.patch 769 bytes ankithashetty
  • ix.2.x:
  • PHP 7.three & MySQL five.7 28,192 laissez passer
#8 drupal-uninitialized_variable_url-2922677-8.patch 811 bytes AaronBauman
  • viii.6.x:
  • PHP vii & MySQL 5.five 24,086 pass
  • viii.eight.x:
  • PHP 7.1 & MySQL 5.7 28,045 pass
  • nine.1.x:
  • PHP vii.4 & MySQL 5.7 Patch Failed to Utilize
  • nine.2.x:
  • PHP 7.three & MySQL 5.seven Patch Failed to Utilise
  • 8.9.10:
  • PHP 7.1 & MySQL 5.7 28,616 pass
#five uncaught_type_error_cannot_read_property_replace_of_undefined-2922677-five.patch 402 bytes id.aleks
  • viii.4.x:
  • PHP 5.five & MySQL five.five 22,330 pass
  • PHP 5.5 & PostgreSQL 9.i 22,328 laissez passer
  • PHP 5.five & SQLite iii.viii 22,327 laissez passer
  • PHP 5.half dozen & MySQL v.5 22,332 laissez passer
  • PHP 5.six & PostgreSQL 9.1 22,330 pass
  • PHP v.6 & SQLite 3.8 22,329 pass
  • PHP 7.0.ten-dev & MySQL 5.5 22,332 pass
  • PHP seven.i.x-dev & MySQL 5.5 22,332 pass
  • PHP seven.1 & MySQL 5.five 22,332 pass
  • PHP 7.2.x-dev & MySQL 5.5 CI aborted
  • PHP 7.2 & MySQL 5.five CI aborted
  • PHP 7 & MySQL v.5 22,332 pass
  • PHP vii & PostgreSQL 9.one 22,330 pass
  • PHP 7 & SQLite 3.fourteen 22,329 laissez passer
  • PHP 7 & MySQL 5.5 22,332 pass
#2 uncaught_type_error_cannot_read_property_replace_of_undefined-2922677-2.patch 811 bytes i.bajrai
  • 8.v.ten:
  • PHP 5.half-dozen & MySQL five.five 22,503 pass
Screen Shot 2017-xi-eleven at 4.24.57 pm.png 87.72 KB i.bajrai
Screen Shot 2017-11-11 at 4.24.37 pm.png 89.72 KB i.bajrai
Screen Shot 2017-11-11 at iv.23.55 pm.png 52.97 KB i.bajrai

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

i.bajrai's picture

Ha...and then the development of ajax in 8.5x is completely different to what I have commented about. The to a higher place attached screenshots are for eight.4x.

I have attached a patch for 8.5x, delight comment for potential regression...

DedMoroz's picture

It works! Thanks a lot!

Dropdown operations do piece of work as ajax links to modal with this patch. Cheers over again.

id.aleks's picture

File Size
402 bytes
  • 8.four.x:
  • PHP 5.5 & MySQL v.5 22,330 pass
  • PHP v.5 & PostgreSQL 9.ane 22,328 pass
  • PHP 5.five & SQLite three.8 22,327 pass
  • PHP 5.6 & MySQL 5.five 22,332 laissez passer
  • PHP 5.6 & PostgreSQL 9.ane 22,330 pass
  • PHP 5.6 & SQLite 3.eight 22,329 pass
  • PHP 7.0.x-dev & MySQL 5.5 22,332 laissez passer
  • PHP 7.1.x-dev & MySQL v.5 22,332 pass
  • PHP seven.1 & MySQL 5.5 22,332 laissez passer
  • PHP 7.2.x-dev & MySQL 5.5 CI aborted
  • PHP seven.ii & MySQL v.5 CI aborted
  • PHP 7 & MySQL 5.v 22,332 pass
  • PHP seven & PostgreSQL ix.1 22,330 pass
  • PHP vii & SQLite 3.14 22,329 pass
  • PHP 7 & MySQL 5.v 22,332 pass

@i.bajrai Thanks for the patch. I adjusted your patch for 8.4.ten-dev version

borisson_'s picture

Condition: Needs review » Needs work

@id.aleks Please don't run the tests for all those versions, that is really difficult on the testbots. Only test for different php versions when using something that is really "weird" code. And the databases should only be tested when changing lawmaking that is related to the db system.

For a javascript-modify, such as this patch - in that location's no demand to practise either.

In whatever case, the .js files are compiled from the .es6 files. So this needs to be inverse in the es6 file and compiled downward the javascript.

AaronBauman's picture

@id.aleks: hither'southward a primer on how to get up and running using es6 https://www.drupal.org/node/2815083
I had to bound through some dependency hoops to get it working (and don't understand at all what the benefit is).

Attached patch is a direct re-curl of #two confronting viii.six.ten-dev

capysara's picture

I was getting the aforementioned error in my console. Patch applies cleanly and resolved my issue. I'm on core 8.9.1

Thanks,
~Sara

tim-diels's picture

bfuzze9898's picture

I'thou having this effect with modal class too. I tin also confirm that after applying #viii the error no longer displays.
This is my ajax submit handler logic:

                                  $response = new AjaxResponse();     // ...     $response->addCommand(new MessageCommand($message,Zip, ['blazon' => $message_type]));     $response->addCommand(new CloseModalDialogCommand());     render $response;                              

ankithashetty's picture

Rerolled the patch in #eight against 9.ii.x, thanks!

imamit1234's picture

hga77's picture

I had the aforementioned error in the panel on D 9.1.ten. Also ajax submission from a modal.

Patch #17 works. Thank yous.

sja112's picture

vikashsoni's picture

#17 patch is resolve my issue in core 8.9.7 Thank you for the patch

o0Charly0o's picture

#17 patch is resolve my upshot in core 9.1.9 Thank you for the patch

hga77's picture

@ranjith_kumar_k_u
You've simply added the same verbal patch every bit #17. Why? Looks like you are trying to get drupal points.. Very suspicious.

brunodbo's picture

Version: ix.2.x-dev » 9.3.x-dev

This happens in 9.3.x-dev also; patch in #24 applies in nine.3.10-dev.

lamp5's picture

In my opinion, trouble is with your html, not with ajax script. Y'all have <a> tag without href attribute and so ajax does not piece of work.