var messages = { "message": ["Message one", "Message two"],
"error": ["Error one", "Error two"]
};
Joomla.renderMessages(messages);
jQuery.ajax({
url: "index.php",
type: "POST",
data:
{
option: "<?php echo $option ?>",
task: "messageform.sentMessage",
params: "<?php echo $this->params64 ?>",
"<?php echo JSession::getFormToken() ?>": '1',
msg:jQuery("#gs-message").val()
},
dataType: "JSON",
success: function(json){
var messages = { "message": ["Message one", "Message two"],
"error": ["Error one", "Error two"]
};
Joomla.renderMessages(messages);
// Joomla.renderMessages(json.messages);
if(json.data == "message_send"){
jQuery("#ga-jq-submit-message-form").fadeOut('fast',function(){
jQuery(this).remove();
});
}
}
});
Correct system message
Uncaught TypeError: Cannot read property 'joomla.jtext' of null
at Object.e.getOptions (core.js?4d4a824…:1)
at Object._ (core.js?4d4a824…:1)
at Object.e.renderMessages (core.js?4d4a824…:1)
at Object.success (messageform.html?tmpl=component&09ca28f…=1¶ms=YToyOntzOjM6ImFpZCI7czozO…:226)
at i (jquery.min.js?4d4a824…:2)
at Object.fireWith [as resolveWith] (jquery.min.js?4d4a824…:2)
at y (jquery.min.js?4d4a824…:4)
at XMLHttpRequest.c (jquery.min.js?4d4a824…:4)
Joomla >3.7 (in joomla <=3.6.5 worked)
Labels |
Added:
?
|
Category | ⇒ | JavaScript |
Status | New | ⇒ | Discussion |
I can confirm this issue exists. And since I had not enough time to dive in, I am using a workaround that is making a useless JText:: script()
call in my layouts.
Is this not caused by not having the system-messages container rendered?
could this also be related to the progressive cache issue like #16375 (comment) ?
- The JHtml::_('behavior.keepalive'); inside the mod_login template file is not being processed when cache in conservative mode.
Status | Discussion | ⇒ | Information Required |
#16488 should resolve the js error
But there is the issue of the joomla.jtext
json could not being loaded in certains conditions and that could be the same issue as #16375 (comment)
@Wojton is this used in a module? does this happen with Progressive cache enabled?
If this Issue get no Response, it will be closed at 17th September 2017.
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-09-17 06:13:34 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_Date | 2017-09-17 06:13:34 | ⇒ | 2017-09-17 06:13:35 |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/16217
This has been closed due to lack of response to the requests above – it can always be reopened.
I can't replicate this!
Please make sure that
core.js
is loaded in your view!code I used: