Situation:
- Trying to use
get helper
- [probably] have not specified API version in package.json
- Disabled v0.1 Public API in labs
In this situation, html should be output that writes an error to the console. What's happening instead is the function signature (i.e. Function.toString) is the only html that's sent. I'm guessing this might have happened when express-hbs was bumped to v2, but there are plenty of other possible causes. I think the fix is just resolving with the error text rather than a function that returns the error text.
Relevant source:
|
errString = new SafeString( |
|
'<script>console.error("' + _.values(errDetails).join(' ') + '");</script>' |
|
); |
|
|
|
if (options.async) { |
|
return Promise.resolve(function asyncError() { |
|
return errString; |
|
}); |
|
} |
Originally reported at the forum. Ghost version in page source was 2.25.x, running on Ghost (Pro).
Output screenshot (rendered to visitor):

HTML output snippet:
</section>
function asyncError() {
return errString;
}
<section>
Situation:
gethelperIn this situation, html should be output that writes an error to the console. What's happening instead is the function signature (i.e. Function.toString) is the only html that's sent. I'm guessing this might have happened when express-hbs was bumped to v2, but there are plenty of other possible causes. I think the fix is just resolving with the error text rather than a function that returns the error text.
Relevant source:
Ghost/core/server/services/labs.js
Lines 43 to 51 in 2048ea5
Originally reported at the forum. Ghost version in page source was 2.25.x, running on Ghost (Pro).
Output screenshot (rendered to visitor):
HTML output snippet: