XF 1.3 message template can't save any change

Shared hosting or your own server. If no errors are showing up in your ACP error log, you need to start looking at the server logs.
Have you disabled all add-ons to see if there might be one interfering?
 
Are you receiving any errors?

Shared hosting or your own server. If no errors are showing up in your ACP error log, you need to start looking at the server logs.
Have you disabled all add-ons to see if there might be one interfering?

Ad blockers can cause this sometimes, you can try disabling it if you have one to see if that helps.

Sorry, just realize that I got some errors

these are the last two :
Code:
Error Info
ErrorException: Fatal Error: Maximum execution time of 30 seconds exceeded - library\XenForo\Template\Compiler.php:557
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(65) "http://localhost/community/admin.php?templates/save-multiple.json"
["_GET"] => array(1) {
["templates/save-multiple_json"] => string(0) ""
}
["_POST"] => array(13) {
["titleArray"] => array(9) {
[855] => string(7) "message"
[40] => string(16) "ad_message_below"
[41] => string(15) "ad_message_body"
[76] => string(11) "bb_code.css"
[197] => string(13) "likes_summary"
[198] => string(17) "likes_summary.css"
[473] => string(11) "message.css"
[846] => string(17) "message_user_info"
[242] => string(21) "message_user_info.css"
}
["styleidArray"] => array(9) {
[855] => string(2) "23"
[40] => string(1) "0"
[41] => string(1) "0"
[76] => string(1) "0"
[197] => string(1) "0"
[198] => string(1) "0"
[473] => string(1) "3"
[846] => string(2) "23"
[242] => string(1) "0"
}
["templateArray"] => array(1) {
[855] => string(3052) "<xen:require css="message.css" />
<xen:require css="bb_code.css" />

<li id="{$messageId}" class="message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_staff}', 'staff'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}">
{xen:raw $messageBeforeTemplate}


<div class="messageInfo primaryContent">
<xen:if is="{$message.isNew}"><strong class="newIndicator"><span></span>{xen:phrase new}</strong></xen:if>

<xen:if hascontent="true">
<ul class="messageNotices">
<xen:contentcheck>
<xen:hook name="message_notices" params="{xen:array 'message={$message}'}">
<xen:if is="{$message.warning_message}">
<li class="warningNotice"><span class="icon Tooltip" title="{xen:phrase warning}" data-tipclass="iconTip flipped"></span>{$message.warning_message}</li>
</xen:if>
<xen:if is="{$message.isDeleted}">
<li class="deletedNotice"><span class="icon Tooltip" title="{xen:phrase deleted}" data-tipclass="iconTip flipped"></span>{xen:phrase this_message_has_been_removed_from_public_view}</li>
<xen:elseif is="{$message.isModerated}" />
<li class="moderatedNotice"><span class="icon Tooltip" title="{xen:phrase awaiting_moderation}" data-tipclass="iconTip flipped"></span>{xen:phrase this_message_is_awaiting_moderator_approval_and_is_invisible_to_normal}</li>
</xen:if>
<xen:if is="{$message.isIgnored}">
<li>{xen:phrase you_are_ignoring_content_by_this_member} <a href="javascript:" class="JsOnly DisplayIgnoredContent">{xen:phrase show_ignored_content}</a></li>
</xen:if>
</xen:hook>
</xen:contentcheck>
</ul>
</xen:if>

<xen:hook name="message_content" params="{xen:array 'message={$message}'}">
<div class="messageContent">
<article>
<blockquote class="messageText ugc baseHtml{xen:if $message.isIgnored, ' ignored'}">
<xen:include template="ad_message_body" />
{xen:raw $message.messageHtml}
</blockquote>
</article>

{xen:raw $messageContentAfterTemplate}
</div>
</xen:hook>

<xen:if is="{$message.last_edit_date}">
<div class="editDate">
<xen:if is="{$message.user_id} == {$message.last_edit_user_id}">
{xen:phrase last_edited}: <xen:datetime time="{$message.last_edit_date}" />
<xen:else />
{xen:phrase last_edited_by_moderator}: <xen:datetime time="{$message.last_edit_date}" />
</xen:if>
</div>
</xen:if>

<xen:if is="{$visitor.content_show_signature} && {$message.signature}">
<div class="baseHtml signature messageText ugc{xen:if $message.isIgnored, ' ignored'}"><aside>{xen:raw $message.signatureHtml}</aside></div>
</xen:if>

{xen:raw $messageAfterTemplate}

<div id="likes-{$messageId}"><xen:if is="{$message.likes}"><xen:include template="likes_summary" /></xen:if></div>
</div>

<xen:hook name="message_below" params="{xen:array 'post={$message}','message_id={$messageId}'}" />

<xen:include template="ad_message_below" />

</li>"
}
["addon_id"] => string(7) "XenForo"
["style_id"] => string(2) "23"
["template_id"] => string(3) "855"
["title_original"] => string(7) "message"
["_xfToken"] => string(8) "********"
["includeTitles"] => array(10) {
[0] => string(7) "message"
[1] => string(7) "message"
[2] => string(11) "message.css"
[3] => string(11) "bb_code.css"
[4] => string(15) "ad_message_body"
[5] => string(19) "ad_message_body.css"
[6] => string(13) "likes_summary"
[7] => string(17) "likes_summary.css"
[8] => string(16) "ad_message_below"
[9] => string(20) "ad_message_below.css"
}
["_TemplateEditorAjax"] => string(1) "1"
["_xfRequestUri"] => string(59) "/community/admin.php?templates/message.855/edit&style_id=23"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}

Code:
Error Info
ErrorException: Fatal Error: Maximum execution time of 30 seconds exceeded - library\Zend\Db\Statement\Mysqli.php:208
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(65) "http://localhost/community/admin.php?templates/save-multiple.json"
["_GET"] => array(1) {
["templates/save-multiple_json"] => string(0) ""
}
["_POST"] => array(13) {
["titleArray"] => array(9) {
[233] => string(7) "message"
[40] => string(16) "ad_message_below"
[41] => string(15) "ad_message_body"
[76] => string(11) "bb_code.css"
[197] => string(13) "likes_summary"
[198] => string(17) "likes_summary.css"
[234] => string(11) "message.css"
[448] => string(17) "message_user_info"
[242] => string(21) "message_user_info.css"
}
["styleidArray"] => array(9) {
[233] => string(1) "0"
[40] => string(1) "0"
[41] => string(1) "0"
[76] => string(1) "0"
[197] => string(1) "0"
[198] => string(1) "0"
[234] => string(1) "0"
[448] => string(1) "1"
[242] => string(1) "0"
}
["templateArray"] => array(1) {
[233] => string(3153) "<xen:require css="message.css" />
<xen:require css="bb_code.css" />

<li id="{$messageId}" class="{xen:if '{$thread.prefix_id} == 2', 'prefixStyle'} message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_staff}', 'staff'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}">

<xen:include template="message_user_info">
<xen:map from="$message" to="$user" />
</xen:include>

<div class="messageInfo primaryContent">
<xen:if is="{$message.isNew}"><strong class="newIndicator"><span></span>{xen:phrase new}</strong></xen:if>

<xen:if hascontent="true">
<ul class="messageNotices">
<xen:contentcheck>
<xen:hook name="message_notices" params="{xen:array 'message={$message}'}">
<xen:if is="{$message.warning_message}">
<li class="warningNotice"><span class="icon Tooltip" title="{xen:phrase warning}" data-tipclass="iconTip flipped"></span>{$message.warning_message}</li>
</xen:if>
<xen:if is="{$message.isDeleted}">
<li class="deletedNotice"><span class="icon Tooltip" title="{xen:phrase deleted}" data-tipclass="iconTip flipped"></span>{xen:phrase this_message_has_been_removed_from_public_view}</li>
<xen:elseif is="{$message.isModerated}" />
<li class="moderatedNotice"><span class="icon Tooltip" title="{xen:phrase awaiting_moderation}" data-tipclass="iconTip flipped"></span>{xen:phrase this_message_is_awaiting_moderator_approval_and_is_invisible_to_normal}</li>
</xen:if>
<xen:if is="{$message.isIgnored}">
<li>{xen:phrase you_are_ignoring_content_by_this_member} <a href="javascript:" class="JsOnly DisplayIgnoredContent">{xen:phrase show_ignored_content}</a></li>
</xen:if>
</xen:hook>
</xen:contentcheck>
</ul>
</xen:if>

<xen:hook name="message_content" params="{xen:array 'message={$message}'}">
<div class="messageContent">
<article>
<blockquote class="messageText ugc baseHtml{xen:if $message.isIgnored, ' ignored'}">
<xen:include template="ad_message_body" />
{xen:raw $message.messageHtml}
</blockquote>
</article>

{xen:raw $messageContentAfterTemplate}
</div>
</xen:hook>

<xen:if is="{$message.last_edit_date}">
<div class="editDate">
<xen:if is="{$message.user_id} == {$message.last_edit_user_id}">
{xen:phrase last_edited}: <xen:datetime time="{$message.last_edit_date}" />
<xen:else />
{xen:phrase last_edited_by_moderator}: <xen:datetime time="{$message.last_edit_date}" />
</xen:if>
</div>
</xen:if>

<xen:if is="{$visitor.content_show_signature} && {$message.signature}">
<div class="baseHtml signature messageText ugc{xen:if $message.isIgnored, ' ignored'}"><aside>{xen:raw $message.signatureHtml}</aside></div>
</xen:if>

{xen:raw $messageAfterTemplate}

<div id="likes-{$messageId}"><xen:if is="{$message.likes}"><xen:include template="likes_summary" /></xen:if></div>
</div>

<xen:hook name="message_below" params="{xen:array 'post={$message}','message_id={$messageId}'}" />

<xen:include template="ad_message_below" />

</li>"
}
["addon_id"] => string(7) "XenForo"
["style_id"] => string(1) "1"
["template_id"] => string(3) "233"
["title_original"] => string(7) "message"
["_xfToken"] => string(8) "********"
["includeTitles"] => array(12) {
[0] => string(7) "message"
[1] => string(7) "message"
[2] => string(11) "message.css"
[3] => string(11) "bb_code.css"
[4] => string(17) "message_user_info"
[5] => string(21) "message_user_info.css"
[6] => string(15) "ad_message_body"
[7] => string(19) "ad_message_body.css"
[8] => string(13) "likes_summary"
[9] => string(17) "likes_summary.css"
[10] => string(16) "ad_message_below"
[11] => string(20) "ad_message_below.css"
}
["_TemplateEditorAjax"] => string(1) "1"
["_xfRequestUri"] => string(58) "/community/admin.php?templates/message.233/edit&style_id=1"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}

any help , please ? Thanks :)
 
The message templates can take some time to save, you may need to increase max_execution_time in your php settings. Also having numerous styles installed and having debug mode on can have a affect on performance.
 
Once more I ask... shared hosting or VPS/dedi?
You need to increase your PHP.ini execution time settings.
The message templates can take some time to save, you may need to increase max_execution_time in your php settings. Also having numerous styles installed and having debug mode on can have a affect on performance.

Briefly talk, there is something inefficiency in my styling code, isn't it ?

Increasing the execution time is kinda akin to increasing the memory_limit in my config.php, am I right ?
 
Once more I ask... shared hosting or VPS/dedi?
You need to increase your PHP.ini execution time settings.

Yes most likely need to do as suggested above.

You shouldn't typically get errors like that when saving templates so you may want to revert the changes and try to determine which edit is causing it.

You will more than likely have to increase some limits if using localhost - the ones I have to change for XAMPP are listed at the bottom of the guide here: https://xenforo.com/community/resources/how-to-install-xenforo-locally-to-your-pc-using-xampp.355/
Those are mainly unrelated though.

Thx for all suggestions, I'm trying this right now, soon will post my result. :)
 
Ok, here is the summary of what I just tried based on your kind suggestions :p

Editing these two brought me no effect:

C:\xampp\mysql\bin\my.ini
Code:
[mysqld]
max_allowed_packet = 512M
. . .
[mysqldump]
max_allowed_packet = 512M

C:\xampp\php\php.ini
Code:
memory_limit = 512M
post_max_size = 512M
upload_max_filesize = 512M

Adding an infinite 'set_time_limit' inside mySqli.php (which the error log was complaining about) does stop the server error log from showing :

C:\xampp\htdocs\community\library\Zend\Db\Statement\Mysqli.php
Code:
<?php
set_time_limit(0);

But there are still some problems with this solution (adding set_time_limit):

1. It does save the change (which previously doesn't), BUT only after I refresh the server error log 1 time then refresh the message template for 2 times (puzzling isn't it :confused:)

2. Despite has been able for saving changes, there is still NO "All templates are successfully saved." overlay appear.

3. I got this new error on my log :
Code:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Lock wait timeout exceeded; try restarting transaction - library\Zend\Db\Statement\Mysqli.php:215
Stack Trace
#0 C:\xampp\htdocs\community\library\Zend\Db\Statement.php(317): Zend_Db_Statement_Mysqli->_execute(Array)
#1 C:\xampp\htdocs\community\library\Zend\Db\Adapter\Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 C:\xampp\htdocs\community\library\Zend\Db\Adapter\Abstract.php(632): Zend_Db_Adapter_Abstract->query('UPDATE `xf_temp...', Array)
#3 C:\xampp\htdocs\community\library\XenForo\DataWriter.php(1640): Zend_Db_Adapter_Abstract->update('xf_template', Array, 'template_id = 8...')
#4 C:\xampp\htdocs\community\library\XenForo\DataWriter.php(1609): XenForo_DataWriter->_update()
#5 C:\xampp\htdocs\community\library\XenForo\DataWriter.php(1405): XenForo_DataWriter->_save()
#6 C:\xampp\htdocs\community\library\XenForo\ControllerAdmin\Template.php(670): XenForo_DataWriter->save()
#7 C:\xampp\htdocs\community\library\XenForo\FrontController.php(347): XenForo_ControllerAdmin_Template->actionSaveMultiple()
#8 C:\xampp\htdocs\community\library\XenForo\FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 C:\xampp\htdocs\community\admin.php(13): XenForo_FrontController->run()
#10 {main}
Request State
array(3) {
["url"] => string(65) "http://localhost/community/admin.php?templates/save-multiple.json"
["_GET"] => array(1) {
["templates/save-multiple_json"] => string(0) ""
}
["_POST"] => array(13) {
["titleArray"] => array(9) {
[855] => string(7) "message"
[40] => string(16) "ad_message_below"
[41] => string(15) "ad_message_body"
[76] => string(11) "bb_code.css"
[197] => string(13) "likes_summary"
[198] => string(17) "likes_summary.css"
[473] => string(11) "message.css"
[846] => string(17) "message_user_info"
[242] => string(21) "message_user_info.css"
}
["styleidArray"] => array(9) {
[855] => string(2) "23"
[40] => string(1) "0"
[41] => string(1) "0"
[76] => string(1) "0"
[197] => string(1) "0"
[198] => string(1) "0"
[473] => string(1) "3"
[846] => string(2) "23"
[242] => string(1) "0"
}
["templateArray"] => array(1) {
[855] => string(3161) "<xen:require css="message.css" />
<xen:require css="bb_code.css" />
/*test*/
<li id="{$messageId}" class="message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_staff}', 'staff'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}">
{xen:raw $messageBeforeTemplate}
<xen:include template="message_user_info">
<xen:map from="$message" to="$user" />
</xen:include>

<div class="messageInfo primaryContent">
<xen:if is="{$message.isNew}"><strong class="newIndicator"><span></span>{xen:phrase new}</strong></xen:if>

<xen:if hascontent="true">
<ul class="messageNotices">
<xen:contentcheck>
<xen:hook name="message_notices" params="{xen:array 'message={$message}'}">
<xen:if is="{$message.warning_message}">
<li class="warningNotice"><span class="icon Tooltip" title="{xen:phrase warning}" data-tipclass="iconTip flipped"></span>{$message.warning_message}</li>
</xen:if>
<xen:if is="{$message.isDeleted}">
<li class="deletedNotice"><span class="icon Tooltip" title="{xen:phrase deleted}" data-tipclass="iconTip flipped"></span>{xen:phrase this_message_has_been_removed_from_public_view}</li>
<xen:elseif is="{$message.isModerated}" />
<li class="moderatedNotice"><span class="icon Tooltip" title="{xen:phrase awaiting_moderation}" data-tipclass="iconTip flipped"></span>{xen:phrase this_message_is_awaiting_moderator_approval_and_is_invisible_to_normal}</li>
</xen:if>
<xen:if is="{$message.isIgnored}">
<li>{xen:phrase you_are_ignoring_content_by_this_member} <a href="javascript:" class="JsOnly DisplayIgnoredContent">{xen:phrase show_ignored_content}</a></li>
</xen:if>
</xen:hook>
</xen:contentcheck>
</ul>
</xen:if>

<xen:hook name="message_content" params="{xen:array 'message={$message}'}">
<div class="messageContent">
<article>
<blockquote class="messageText ugc baseHtml{xen:if $message.isIgnored, ' ignored'}">
<xen:include template="ad_message_body" />
{xen:raw $message.messageHtml}
</blockquote>
</article>

{xen:raw $messageContentAfterTemplate}
</div>
</xen:hook>

<xen:if is="{$message.last_edit_date}">
<div class="editDate">
<xen:if is="{$message.user_id} == {$message.last_edit_user_id}">
{xen:phrase last_edited}: <xen:datetime time="{$message.last_edit_date}" />
<xen:else />
{xen:phrase last_edited_by_moderator}: <xen:datetime time="{$message.last_edit_date}" />
</xen:if>
</div>
</xen:if>

<xen:if is="{$visitor.content_show_signature} && {$message.signature}">
<div class="baseHtml signature messageText ugc{xen:if $message.isIgnored, ' ignored'}"><aside>{xen:raw $message.signatureHtml}</aside></div>
</xen:if>

{xen:raw $messageAfterTemplate}







<div id="likes-{$messageId}"><xen:if is="{$message.likes}"><xen:include template="likes_summary" /></xen:if></div>
</div>

<xen:hook name="message_below" params="{xen:array 'post={$message}','message_id={$messageId}'}" />

<xen:include template="ad_message_below" />

</li>"
}
["addon_id"] => string(7) "XenForo"
["style_id"] => string(2) "23"
["template_id"] => string(3) "855"
["title_original"] => string(7) "message"
["_xfToken"] => string(8) "********"
["includeTitles"] => array(12) {
[0] => string(7) "message"
[1] => string(7) "message"
[2] => string(11) "message.css"
[3] => string(11) "bb_code.css"
[4] => string(17) "message_user_info"
[5] => string(21) "message_user_info.css"
[6] => string(15) "ad_message_body"
[7] => string(19) "ad_message_body.css"
[8] => string(13) "likes_summary"
[9] => string(17) "likes_summary.css"
[10] => string(16) "ad_message_below"
[11] => string(20) "ad_message_below.css"
}
["_TemplateEditorAjax"] => string(1) "1"
["_xfRequestUri"] => string(59) "/community/admin.php?templates/message.855/edit&style_id=23"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
I don't know about doing it in the PHP file itself.. I always just set it at the php.ini level

Code:
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 90
 
I don't know about doing it in the PHP file itself.. I always just set it at the php.ini level

Code:
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 90

It brought the same effect with this one, thx though :)
v
v
v
C:\xampp\php\php.ini
Code:
memory_limit = 512M
post_max_size = 512M
upload_max_filesize = 512M
 
Last edited:
You shouldn't typically get errors like that when saving templates so you may want to revert the changes and try to determine which edit is causing it.

You will more than likely have to increase some limits if using localhost - the ones I have to change for XAMPP are listed at the bottom of the guide here: https://xenforo.com/community/resources/how-to-install-xenforo-locally-to-your-pc-using-xampp.355/
Those are mainly unrelated though.

@Brogan I am curently trying to save changes on my reverted message_user_info (which is included in message template) template , but getting this new error overlay, what is this likely to be ?
Code:
The following error occurred:
Mysqli statement execute error : Duplicate entry 'message_user_info-23' for key 'title_style_id'
[LIST=1]
[*]Zend_Db_Statement_Mysqli->_execute() in C:\xampp\htdocs\community\library\Zend\Db\Statement.php at line 317
[*]Zend_Db_Statement->execute() in C:\xampp\htdocs\community\library\Zend\Db\Adapter\Abstract.php at line 479
[*]Zend_Db_Adapter_Abstract->query() in C:\xampp\htdocs\community\library\Zend\Db\Adapter\Abstract.php at line 574
[*]Zend_Db_Adapter_Abstract->insert() in C:\xampp\htdocs\community\library\XenForo\DataWriter.php at line 1624
[*]XenForo_DataWriter->_insert() in C:\xampp\htdocs\community\library\XenForo\DataWriter.php at line 1613
[*]XenForo_DataWriter->_save() in C:\xampp\htdocs\community\library\XenForo\DataWriter.php at line 1405
[*]XenForo_DataWriter->save() in C:\xampp\htdocs\community\library\XenForo\ControllerAdmin\Template.php at line 670
[*]XenForo_ControllerAdmin_Template->actionSaveMultiple() inC:\xampp\htdocs\community\library\XenForo\FrontController.php at line 347
[*]XenForo_FrontController->dispatch() in C:\xampp\htdocs\community\library\XenForo\FrontController.php at line 134
[*]XenForo_FrontController->run() in C:\xampp\htdocs\community\admin.php at line 13
[/LIST]
 
@Brogan I just tried reverting my message template along with all other templates included inside (i.e. message_user_info) with no result.

One last question for this:
Is it possible to be an add-on conflict ?

thx :)
 
Back
Top Bottom