Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am writing an install profile for D8. I had a problem with my yaml files which caused this error. The error (with my yaml) isn't the bug. The fact that the progress bar doesn't tell you that an error occurred is the bug.
Currently when this happens the progress bad just keeps going, stuck waiting for a response.
Firebug throws this error to the console.
TypeError: Drupal.AjaxError is not a constructor
[Break On This Error]
throw new Drupal.AjaxError(xmlhttp, pb.uri); progre...8.0-dev (line 91)
The response from the server is:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>Home | Drupal</title>
<meta charset="utf-8" />
<link rel="shortcut icon" href="http://localhost:8888/drupal/core/misc/favicon.ico" type="image/vnd.microsoft.icon" />
<meta name="Generator" content="Drupal 8 (http://drupal.org)" />
<meta name="robots" content="noindex, nofollow" />
<style media="all">
@import url("http://localhost:8888/drupal/core/misc/normalize/normalize.css?0");
</style>
<style media="all">
@import url("http://localhost:8888/drupal/core/modules/system/system.base.css?0");
@import url("http://localhost:8888/drupal/core/modules/system/system.admin.css?0");
@import url("http://localhost:8888/drupal/core/modules/system/system.theme.css?0");
@import url("http://localhost:8888/drupal/core/modules/system/system.maintenance.css?0");
</style>
<style media="screen">
@import url("http://localhost:8888/drupal/core/themes/seven/style.css?0");
</style>
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://localhost:8888/drupal/core/themes/seven/ie.css?0" media="all" />
<![endif]-->
<script src="http://localhost:8888/drupal/core/themes/seven/js/mobile.install.js?0"></script>
</head>
<body class="maintenance-page in-maintenance db-offline one-sidebar sidebar-first">
<header id="branding">
<h1 class="page-title">Home</h1> </header>
<div id="page">
<div id="sidebar-first" class="sidebar">
<img id="logo" src="http://localhost:8888/drupal/core/themes/seven/logo.png" alt="Drupal" />
<h2 class="element-invisible">Installation tasks</h2><ol class="task-list"><li class="done">Choose language<span class="element-invisible">(done)</span></li><li class="done">Choose profile<span class="element-invisible">(done)</span></li><li class="done">Verify requirements<span class="element-invisible">(done)</span></li><li class="done">Set up database<span class="element-invisible">(done)</span></li><li class="active">Installation profile<span class="element-invisible">(active)</span></li><li>Configure site</li><li>Finished</li></ol> </div>
<main id="content" class="clearfix">
Attempt to create an instance of unknown field fc68de01-a24b-451a-8602-2b80cc5d46c0 </main>
</div>
<footer role="contentinfo">
</footer>
</body>
</html>
Comment | File | Size | Author |
---|---|---|---|
#19 | 2000558-19.patch | 532 bytes | pwolanin |
#14 | error.png | 67.64 KB | dawehner |
#14 | drupal-2000558-14.patch | 511 bytes | dawehner |
#13 | 2000558-13.patch | 531 bytes | pwolanin |
#9 | Screenshot - 05252013 - 08:32:06 PM.png | 39.11 KB | ParisLiakos |
Comments
Comment #1
frobI just checked and Drupal.AjaxError is defined in /core/misc/ajax.js
This file isn't loaded on the install screen.
Comment #2
nod_In the HTML you put, the progressbar script isn't added to this page. Can you show the HTML that has the progressbar script tag?
Comment #3
frobIt is just the standard progress bar that tells you it is installing modules.
Comment #4
nod_if batch is on the page and has been added with drupal_add_library() like it should, ajax.js should be on the page. I'll see if that happens with the standard profile.( edit ) looking more closely that's not the case.
Comment #5
nod_ok the patch should make this js error go away. As for displaying the error, remember it used to be an alert? now it only shows up in the console.
To display that to users check #77245-15: Provide a common API for displaying JavaScript messages which is part of #1419652: JavaScript logging and error reporting.
Comment #6
frobBeautiful. works.
Comment #7
shixish CreditAttribution: shixish commentedI was getting this error when trying to install Drupal on my Windows 8 Wamp:
mysql 5.5.24
php 5.4.3
apache 2.4.2
I applied this patch, and the installer got farther than before.
I was getting this error when it got to the Help module (#29), now it gets to the Image module (#30), and produces this error:
Comment #8
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks.
Comment #9
ParisLiakos CreditAttribution: ParisLiakos commentedi dont think this is totally fixed...enable simpletest module, and go try to run a test which you have first have hacked to fatal error...eg call an undefined function...
batch, will just stay there loading for ever..
Uncaught [object Object] progress.js:90
Shouldnt it report to me, that my test is failing? instead of just waiting there for ever, until i remember that i should check my apache error log...or the console, to see whether the test is still running, or actually crashed
Comment #10
nod_I'll be working on it in a few hours if nobody picks it up before.
Comment #11
ParisLiakos CreditAttribution: ParisLiakos commentedtagging
Comment #12
ParisLiakos CreditAttribution: ParisLiakos commentedand its a regression..so critical
Comment #13
pwolanin CreditAttribution: pwolanin commentedThis change at least stops the batch, but you dont' get the really nice table for the stack trace.
Comment #14
dawehnerAs the DX is horrible I would propose to not throw an error in this case.
To trigger an error just write something like $foo->test(); in a test.
Comment #15
nod_looks like it'd need to be wrapped in a
<pre>
or something to make the message readable at least.Comment #16
BerdirYes, but it didn't do that before either, so it's not part of the regression IMHO and I'd be more than fine to get it in like that. In case of Simpletest, you can still see the error in better formatted way in the test results.
Comment #17
ParisLiakos CreditAttribution: ParisLiakos commentedyes #14 is exactly like it used to be and its rtbc imo
thank you!
Comment #18
frobBerdir, so does that mean that we cannot put a pre tag on the output?
Comment #19
pwolanin CreditAttribution: pwolanin commentedWith PRE it does look better, though not sure where it's best added.
Comment #20
tim.plunkettGreat, thanks.
Comment #21
alexpottCommitted 872c343 and pushed to 8.x. Thanks!
Comment #23
frobThis is still happening if there is a php error in the hook_install implementation.
The error happens and the batch fails but doesn't tell anyone. I will attempt to reproduce and post steps.
Comment #24
nod_Make sure you clear your browser cache, especially if you're using chrome.
Comment #25
frobSwitching back to fixed. This looks like a different error.
posted new bug report here. https://drupal.org/node/2036745