1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Entering phrases over 75 characters in admin template editor will trigger exception instead of error

Discussion in 'Resolved Bug Reports' started by tyteen4a03, Mar 20, 2013.

  1. tyteen4a03

    tyteen4a03 Well-Known Member

    Title. The original phrase was 83 characters long (by accident, of course)

    Mysqli statement execute error : Data too long for column 'phrase_title' at row 1

    Can't seem to copy all the traces so I'm just going to paste the html:
    <ol class="traceHtml">
    <li><b class="function">Zend_Db_Statement_Mysqli-&gt;_execute()</b> <span class="shade">in</span> <b class="file">*\library\Zend\Db\Statement.php</b> <span class="shade">at line</span> <b class="line">317</b></li>
    <li><b class="function">Zend_Db_Statement-&gt;execute()</b> <span class="shade">in</span> <b class="file">*\library\Zend\Db\Adapter\Abstract.php</b> <span class="shade">at line</span> <b class="line">479</b></li>
    <li><b class="function">Zend_Db_Adapter_Abstract-&gt;query()</b> <span class="shade">in</span> <b class="file">*\library\Zend\Db\Adapter\Abstract.php</b> <span class="shade">at line</span> <b class="line">574</b></li>
    <li><b class="function">Zend_Db_Adapter_Abstract-&gt;insert()</b> <span class="shade">in</span> <b class="file">*\library\XenForo\Model\AdminTemplate.php</b> <span class="shade">at line</span> <b class="line">593</b></li>
    <li><b class="function">XenForo_Model_AdminTemplate-&gt;compileParsedAdminTemplate()</b> <span class="shade">in</span> <b class="file">*\library\XenForo\DataWriter\AdminTemplate.php</b> <span class="shade">at line</span> <b class="line">227</b></li>
    <li><b class="function">XenForo_DataWriter_AdminTemplate-&gt;_recompileTemplate()</b> <span class="shade">in</span> <b class="file">*\library\XenForo\DataWriter\AdminTemplate.php</b> <span class="shade">at line</span> <b class="line">207</b></li>
    <li><b class="function">XenForo_DataWriter_AdminTemplate-&gt;_postSave()</b> <span class="shade">in</span> <b class="file">*\library\XenForo\DataWriter.php</b> <span class="shade">at line</span> <b class="line">1385</b></li>
    <li><b class="function">XenForo_DataWriter-&gt;save()</b> <span class="shade">in</span> <b class="file">*\library\XenForo\ControllerAdmin\AdminTemplate.php</b> <span class="shade">at line</span> <b class="line">262</b></li>
    <li><b class="function">XenForo_ControllerAdmin_AdminTemplate-&gt;actionSaveMultiple()</b> <span class="shade">in</span> <b class="file">*\library\XenForo\FrontController.php</b> <span class="shade">at line</span> <b class="line">310</b></li>
    <li><b class="function">XenForo_FrontController-&gt;dispatch()</b> <span class="shade">in</span> <b class="file">*\library\XenForo\FrontController.php</b> <span class="shade">at line</span> <b class="line">132</b></li>
    <li><b class="function">XenForo_FrontController-&gt;run()</b> <span class="shade">in</span> <b class="file">*\admin.php</b> <span class="shade">at line</span> <b class="line">13</b></li>
  2. digitalpoint

    digitalpoint Well-Known Member

    Do you *have* phrases with titles more than 75 characters? The phrase table doesn't *allow* titles > 75 characters to begin with.
  3. tyteen4a03

    tyteen4a03 Well-Known Member

    No, since it wouldn't allow through. However, when saving a template with a phrase name that long, it should warn me instead of throwing this error.
  4. digitalpoint

    digitalpoint Well-Known Member

    Wouldn't it make more sense to create the phrase before saving it anyway? If for no other reason for sake of efficiency... otherwise you need to go back and compile the template again when the phrase is edited/added after the fact.
  5. tyteen4a03

    tyteen4a03 Well-Known Member

    For me I work the other way - I decide which phrase to add in the template, save once, then add the phrases and see the effect.
  6. Mike

    Mike XenForo Developer Staff Member

    Fixed. For DP's reference, this happened when you had a {xen:phrase ...} tag where the phrase name was too long. It keeps the phrase name in a table so when you edit a phrase it knows what needs to be recompiled. That phrase doesn't need to already exist (unlike template includes).
    Slavik likes this.

Share This Page