XF 2.2 Template error: [E_WARNING] A non-numeric value encountered

Nirjonadda

Well-known member
I am getting Server error log after upgraded to PHP 8 from 7.4 that causes a PHP 8 incompatibility error.

Code:
ErrorException: Template error: [E_WARNING] A non-numeric value encountered internal_data/code_cache/templates/l1/s12/public/extra.less.php:99

Generated by: Unknown account Jul 17, 2021 at 12:36 AM

Stack trace

#0 internal_data/code_cache/templates/l1/s12/public/extra.less.php(99): XF\Template\Templater->handleTemplateError(2, '[E_WARNING] A n...', '/home/nadda/pub...', 99)
#1 src/XF/Template/Templater.php(1644): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, NULL)
#2 src/addons/MaZ/AMP/XF/Template/XF22/Templater.php(52): XF\Template\Templater->renderTemplate('extra.less', Array, false, NULL)
#3 src/XF/CssRenderer.php(331): MaZ\AMP\XF\Template\XF22\Templater->renderTemplate('public:extra.le...', Array, false)
#4 src/XF/CssRenderer.php(258): XF\CssRenderer->renderTemplate('public:extra.le...', NULL)
#5 src/addons/ThemeHouse/UIX/XF/CssRenderer.php(40): XF\CssRenderer->renderTemplates(Array, Array, Array)
#6 src/XF/CssRenderer.php(116): ThemeHouse\UIX\XF\CssRenderer->renderTemplates(Array, Array, Array)
#7 src/XF/CssWriter.php(53): XF\CssRenderer->render(Array)
#8 src/addons/SV/RedisCache/XF/CssWriter.php(52): XF\CssWriter->run(Array, 12, 1, '9be90d36415bf53...')
#9 css.php(30): SV\RedisCache\XF\CssWriter->run(Array, 12, 1, '9be90d36415bf53...')
#10 {main}

Request state

array(4) {
  ["url"] => string(1183) "/css.php?css=public%3Aaf_as_message_postbit.less%2Cpublic%3Aallm_tag_check_post_links_status.less%2Cpublic%3Aaloph_op_ribbon_style.less%2Cpublic%3Abssp_bootstrap_datetimepicker.less%2Cpublic%3Abssp_schedule.less%2Cpublic%3Acarousel.less%2Cpublic%3AcontentCopyProtection.less%2Cpublic%3AcontentCopyProtection_quote_bbcode.less%2Cpublic%3AcontentCopyProtection_url_bbcode.less%2Cpublic%3Adbtech_shop.less%2Cpublic%3Adbtech_shop_postbit.less%2Cpublic%3Aeditor.less%2Cpublic%3Akl_em_editor_templates.less%2Cpublic%3Akl_em_froala_fullscreen.less%2Cpublic%3Akl_em_froala_image.less%2Cpublic%3Akl_em_froala_special_characters.less%2Cpublic%3Alightslider.less%2Cpublic%3Amessage.less%2Cpublic%3Anotices.less%2Cpublic%3Ashare_controls.less%2Cpublic%3Asiropu_ads_manager_ad.less%2Cpublic%3Asnog_flags.less%2Cpublic%3Astructured_list.less%2Cpublic%3AsvAdvancedBBCode_wordcount.less%2Cpublic%3AsvESE_autocomplete.less%2Cpublic%3AsvLazyImageLoader.less%2Cpublic%3Asv_bbcode_spoiler.less%2Cpublic%3Ath_covers.less%2Cpublic%3Ath_uix_threadStarterPost.less%2Cpublic%3Athfilters_node_label.less%2Cpublic%3Axb.less%2Cpublic%3Aextra.less&s=12&l=1&d=1626451819&k=9be90d36415bf53b92a19384d0c130ff164c7713"
  ["referrer"] => string(37) "/threads/47120/"
  ["_GET"] => array(5) {
    ["css"] => string(979) "public:af_as_message_postbit.less,public:allm_tag_check_post_links_status.less,public:aloph_op_ribbon_style.less,public:bssp_bootstrap_datetimepicker.less,public:bssp_schedule.less,public:carousel.less,public:contentCopyProtection.less,public:contentCopyProtection_quote_bbcode.less,public:contentCopyProtection_url_bbcode.less,public:dbtech_shop.less,public:dbtech_shop_postbit.less,public:editor.less,public:kl_em_editor_templates.less,public:kl_em_froala_fullscreen.less,public:kl_em_froala_image.less,public:kl_em_froala_special_characters.less,public:lightslider.less,public:message.less,public:notices.less,public:share_controls.less,public:siropu_ads_manager_ad.less,public:snog_flags.less,public:structured_list.less,public:svAdvancedBBCode_wordcount.less,public:svESE_autocomplete.less,public:svLazyImageLoader.less,public:sv_bbcode_spoiler.less,public:th_covers.less,public:th_uix_threadStarterPost.less,public:thfilters_node_label.less,public:xb.less,public:extra.less"
    ["s"] => string(2) "12"
    ["l"] => string(1) "1"
    ["d"] => string(10) "1626451819"
    ["k"] => string(40) "9be90d36415bf53b92a19384d0c130ff164c7713"
  }
  ["_POST"] => array(0) {
  }
}

Code:
ErrorException: Template error: [E_WARNING] A non-numeric value encountered internal_data/code_cache/templates/l1/s2/public/extra.less.php:156

Generated by: Unknown account Jul 17, 2021 at 12:41 AM

Stack trace

#0 internal_data/code_cache/templates/l1/s2/public/extra.less.php(156): XF\Template\Templater->handleTemplateError(2, '[E_WARNING] A n...', '/home/nadda/pub...', 156)
#1 src/XF/Template/Templater.php(1644): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, NULL)
#2 src/addons/MaZ/AMP/XF/Template/XF22/Templater.php(52): XF\Template\Templater->renderTemplate('extra.less', Array, false, NULL)
#3 src/XF/CssRenderer.php(331): MaZ\AMP\XF\Template\XF22\Templater->renderTemplate('public:extra.le...', Array, false)
#4 src/XF/CssRenderer.php(258): XF\CssRenderer->renderTemplate('public:extra.le...', NULL)
#5 src/addons/ThemeHouse/UIX/XF/CssRenderer.php(40): XF\CssRenderer->renderTemplates(Array, Array, Array)
#6 src/XF/CssRenderer.php(116): ThemeHouse\UIX\XF\CssRenderer->renderTemplates(Array, Array, Array)
#7 src/XF/CssWriter.php(53): XF\CssRenderer->render(Array)
#8 src/addons/SV/RedisCache/XF/CssWriter.php(52): XF\CssWriter->run(Array, 2, 1, 'f5141e13a57ffd7...')
#9 css.php(30): SV\RedisCache\XF\CssWriter->run(Array, 2, 1, 'f5141e13a57ffd7...')
#10 {main}

Request state

array(4) {
  ["url"] => string(752) "/css.php?css=public%3Aattachments.less%2Cpublic%3Abssp_bootstrap_datetimepicker.less%2Cpublic%3Abssp_schedule.less%2Cpublic%3Adbtech_shop.less%2Cpublic%3Adbtech_shop_item_grid.less%2Cpublic%3Aeditor.less%2Cpublic%3Akl_em_editor_templates.less%2Cpublic%3Akl_em_froala_fullscreen.less%2Cpublic%3Akl_em_froala_image.less%2Cpublic%3Akl_em_froala_special_characters.less%2Cpublic%3Alightbox.less%2Cpublic%3Amessage.less%2Cpublic%3Anode_list.less%2Cpublic%3Anotices.less%2Cpublic%3Arating_stars.less%2Cpublic%3Astructured_list.less%2Cpublic%3AsvAdvancedBBCode_wordcount.less%2Cpublic%3AsvESE_autocomplete.less%2Cpublic%3Ath_covers.less%2Cpublic%3Athfilters_node_label.less%2Cpublic%3Aextra.less&s=2&l=1&d=1626451819&k=f5141e13a57ffd77cf773fb2a8bda30fa97f259b"
  ["referrer"] => string(33) "/whats-new/"
  ["_GET"] => array(5) {
    ["css"] => string(593) "public:attachments.less,public:bssp_bootstrap_datetimepicker.less,public:bssp_schedule.less,public:dbtech_shop.less,public:dbtech_shop_item_grid.less,public:editor.less,public:kl_em_editor_templates.less,public:kl_em_froala_fullscreen.less,public:kl_em_froala_image.less,public:kl_em_froala_special_characters.less,public:lightbox.less,public:message.less,public:node_list.less,public:notices.less,public:rating_stars.less,public:structured_list.less,public:svAdvancedBBCode_wordcount.less,public:svESE_autocomplete.less,public:th_covers.less,public:thfilters_node_label.less,public:extra.less"
    ["s"] => string(1) "2"
    ["l"] => string(1) "1"
    ["d"] => string(10) "1626451819"
    ["k"] => string(40) "f5141e13a57ffd77cf773fb2a8bda30fa97f259b"
  }
  ["_POST"] => array(0) {
  }
}
 
It seems to be related to content in your extra.less template.

PHP 8.0 is stricter with certain value types so an error isn't totally unexpected though if you can pinpoint the specific problematic code (it may be close to line 99, though the line numbers in the compiled template aren't always 1:1) then we can give advice on that.
 
@Chris D This my extra.less template.


Code:
{{ include('xenfocus_base.less') }}
{{ include('xenfocus_theme.less') }}

// Place your custom code below

/* I-Line BBCode */
.bbCodeInline{ font-size: inherit; }

/* Navigation icons START */
<xf:if is="property('xenfocus_navIcons')">
  .focus-wrap-nav .p-navEl-link,.offCanvasMenu-linkHolder .offCanvasMenu-link[data-nav-id]{
    &[data-nav-id="imagehost"]:before{ content: '\f093'; }
    &[data-nav-id="snog_forms_nav"]:before{ content: '\f0fe'; }
    &[data-nav-id="dbtechShop"]:before{ content: '\f217'; }
    &[data-nav-id="th_donate"]:before{ content: '\f155'; }
    &[data-nav-id="addonFlarePubAwards"]:before{ content: '\f091'; }
  }
</xf:if>
/* Navigation icons END */

/* Original Poster Highlight */
div.ribbonBox .ribbon-wrapper{ z-index: 1; }

.reactions-left > ul { flex-wrap: wrap; }

.xenfocus-social a{ min-width: 40px; }
.xenfocus-social a:before{ display: block; flex: 0 0 auto; }

/* Remove show open new Tab button from Lightbox */
#lg-new-window {
    display: none !important;
}

/* Enable Sub-Navigation without drop down */
@focus-dropdown-nav: false;

/* Sticky Sidebar for Top Posters of the Month */
<xf:if is="property('ss_sidebar') == 'enabled'">
@media (min-width: @xf-responsiveMedium) {
    [data-template="tpm_list"] .stickySidebar {
        position: -webkit-sticky;
        position: sticky;
        top: calc(47px + @{xf-ss_top});
    }
}
</xf:if>

/* Medal show in center for post message */
ul.bdMedal_userMedals { text-align: center; }

/* Hide Medals show post message from mobile view */
@media (max-width: 650px) { ul.bdMedal_userMedals { display: none; } }

.message-userExtras { text-align: center; }

/* Google Search icon show */
button.button--primary.google-search-button .button-text
{
    padding-left: 0;
}

@media (min-width: (@xf-responsiveMedium + 1px)){
    .block--similarContents .structItem{
        display: table;
    }
}

/* Holidays Breadcrumb navigation long space */
.th_holiday__categoryStrip__left,
.th_holiday__categoryStrip__center,
.th_holiday__categoryStrip__right{
display: none;
}

/* Change the font size for Paid Registrations accountype IDs: 4 */
div.accountType[data-id="4"] div.price
{
    font-size: .85em;
}

/* Font Awesome icon Display in ads manager keyword link */
.keywordLink
{
    color: green;
    font-weight: bold;
    text-transform: uppercase;
}
.keywordLink:before
{
    .m-faBase();
    .m-faContent(@fa-var-link);
    margin-left: 5px;
}

/* Notice Display Styling */
.cxf-notice {
    color: #aa6709;
    background: #fff4e5;
    border-left: 3px solid #f2930d;
    text-align: left;
    position: relative;
    padding-left: 3em;
    min-height: 4em;

    &:before {
        .m-faBase();
        .m-faContent(@fa-var-exclamation-circle);
        color: #f2930d;
        font-size: 280%;
        position: absolute;
        top: 0;
        left: 6px;
    }
}

/* Add Widgets icon - Start */
.block-minorHeader::before{

    .block[data-widget-definition="eae_highlight_groups"] &{
        .m-faContent(@fa-var-user-secret);
    }
    
    .block[data-widget-definition="member_stat"] &{
        .m-faContent(@fa-var-trophy);
    }
    
        .block[data-widget-definition="thdonate_campaign"] &{
        .m-faContent(@fa-var-hand-holding-usd);
    }
    
        .block[data-widget-definition="snog_stylestats"] &{
        .m-faContent(@fa-var-star-half-alt);
    }
    
        .block[data-widget-definition="tpm_widget"] &{
        .m-faContent(@fa-var-user-graduate);
    }
    
}
/* Add Widgets icon - End */

/* Individual Boxed for Shop Gift START */
.message-userExtras dl, .dbtechShopPostbit.dbtechShopPostbit-items
{
    background-color: @xf-contentBg;
    padding: @xf-paddingSmall @xf-paddingMedium;
    border: 1px solid @xf-borderColor;
    border-radius: @xf-borderRadiusMedium;
    margin-bottom: 3px;
}
/* Individual Boxed for Shop Gift END */

/* Bottom border to the editor toolbar */
.fr-box.fr-basic {
    border: 1px solid @xf-borderColorLight;
}

.fr-box.fr-basic .fr-toolbar.fr-top {
    border-bottom: 1px solid @xf-borderColorLight;
}

.fr-toolbar .fr-btn-grp.rte-tab--inactive {
    border-bottom-width: 0px;
    border-left: 1px solid @xf-borderColorLight;
}
/* Bottom border to the editor toolbar */

/* Hide postbit moods for mobile browser */
@media (max-width: @xf-messageSingleColumnWidth)
{
    .afMood--postbit
    {
        display: none;
    }
}
/* Hide postbit moods for mobile browser */
 
The issue is pretty clear. A non-numeric value encountered in extra.less

So you have a property that should have a numeric value with a non-numeric value. You can work with the browser dev tools to look for errors or missing values.
 
The issue is pretty clear. A non-numeric value encountered in extra.less

So you have a property that should have a numeric value with a non-numeric value. You can work with the browser dev tools to look for errors or missing values.

Does not find out any error in browser dev tools.
 
It seems to be related to content in your extra.less template.

PHP 8.0 is stricter with certain value types so an error isn't totally unexpected though if you can pinpoint the specific problematic code (it may be close to line 99, though the line numbers in the compiled template aren't always 1:1) then we can give advice on that.

Please can give advice for this issue? I have posted extra.less template.
 
Can you post the compiled files internal_data/code_cache/templates/l1/s12/public/extra.less.php and internal_data/code_cache/templates/l1/s2/public/extra.less.php - the error is in this compiled file, the template itself won't match the line numbers.

The error we had in Nodes was due to it trying to add a value like this:

{{ property('responsiveEdgeSpacerRemoval') + 1 }}px

responsiveEdgeSpacerRemoval was a value like 650px and 650px + 1 was erroring in PHP 8, so had to change it to use calc:

calc({{ property('responsiveEdgeSpacerRemoval') }} + 1px)

I can't see anything doing this in that template though, so it may be in one of the other includes at the top. The compiled template should help track it down.
 
due to it trying to add a value like this:

{{ property('responsiveEdgeSpacerRemoval') + 1 }}px

responsiveEdgeSpacerRemoval was a value like 650px and 650px + 1 was erroring in PHP 8, so had to change it to use calc:

calc({{ property('responsiveEdgeSpacerRemoval') }} + 1px)
Thanks, this solved a very similar phrase for me.
 
Can you post the compiled files internal_data/code_cache/templates/l1/s12/public/extra.less.php

Code:
text/x-generic extra.less.php ( PHP script, ASCII text )

<?php
// FROM HASH: ff14387785c4fb145ea0c6b90c1a5180
return array(
'code' => function($__templater, array $__vars, $__extensions = null)
{
    $__finalCompiled = '';
    $__finalCompiled .= '.p-navSticky--primary .p-nav {
    max-width: 100%;
}

/* Sticky Sidebar for Top Posters of the Month */
';
    if ($__templater->func('property', array('ss_sidebar', ), false) == 'enabled') {
        $__finalCompiled .= '
@media (min-width: @xf-responsiveMedium) {
    [data-template="tpm_list"] .stickySidebar {
        position: -webkit-sticky;
        position: sticky;
        top: calc(47px + @{xf-ss_top});
    }
}
';
    }
    $__finalCompiled .= '

/* Navigation icons */
.p-nav-list .p-navEl a.p-navEl-link[data-nav-id="imagehost"]:before { content: "\\f093"; }
.p-nav-list .p-navEl a.p-navEl-link[data-nav-id="snog_forms_nav"]:before { content: "\\f0fe"; }
.p-nav-list .p-navEl a.p-navEl-link[data-nav-id="dbtechShop"]:before { content: "\\f217"; }
.p-nav-list .p-navEl a.p-navEl-link[data-nav-id="addonFlarePubAwards"]:before { content: "\\f091"; }

/* Medal show in center for post message */
ul.bdMedal_userMedals { text-align: center; }

/* Hide Medals show post message from mobile view */
@media (max-width: 650px) { ul.bdMedal_userMedals { display: none; } }

/* UserExtras show in center on Post message */
.message-userExtras { text-align: center; }

/* Change the font size for Paid Registrations accountype IDs: 4 */
div.accountType[data-id="4"] div.price
{
    font-size: .85em;
}

/* CanvasMenu Navigation icons START */
.offCanvasMenu-linkHolder [data-nav-id="imagehost"]:before { content: "\\f093"; }
.offCanvasMenu-linkHolder [data-nav-id="snog_forms_nav"]:before { content: "\\f0fe"; }
.offCanvasMenu-linkHolder [data-nav-id="addonFlarePubAwards"]:before { content: "\\f217"; }
.offCanvasMenu-linkHolder [data-nav-id="dbtechShop"]:before { content: "\\f091"; }
/* CanvasMenu Navigation icons END */

/* Style switch icon in Footer START */
.p-linkList-changeStyle a:before, .p-linkList-changeWidth a:before, .p-linkList-changeLanguage a:before, .p-linkList-toggleSidebar a:before
{
    .m-faBase();
    display: inline-block;
    margin-right: 2px;
}
.p-linkList-changeStyle a:before { .m-faContent(@fa-var-paint-brush); }
.p-linkList-changeWidth a:before { .m-faContent(@fa-var-sliders-h); }
.p-linkList-changeLanguage a:before { .m-faContent(@fa-var-globe); }
.p-linkList-toggleSidebar a:before { .m-faContent(@fa-var-toggle-on); }
/* Style switch icon in Footer END */

/* Change width hide for mobile */
@media (max-width: @xf-responsiveWide) { li.p-linkList-changeWidth { display: none; } }
/* Change width hide for mobile */

/* Individual Boxed for Shop Gift START */
.dbtechShopPostbit.dbtechShopPostbit-items
{
    background-color: @xf-contentBg;
    padding: @xf-paddingSmall @xf-paddingMedium;
    border: 1px solid @xf-borderColor;
    border-radius: @xf-borderRadiusMedium;
    margin-bottom: 3px;
}
/* Individual Boxed for Shop Gift END */

/* Mobile Experience responsive ads START */
.ad-responsive {
max-width: 100%;
height: auto;
}
/* Mobile Experience responsive ads END */

/* Add icon to action control START */
.actionBar-action.actionBar-action--menuItem.LinkCheckTrigger:before {
    content: "\\f360\\20";
}
.actionBar-action.actionBar-action--changeOwnerAndDate:before {
    content: "\\f017\\20";
}
/* Add icon to action control END */

/* Sticky user cell - Start */
@media (min-width: ' . ($__templater->func('property', array('responsiveMedium', ), false) + 1) . 'px )
{
    .message-cell.message-cell--user section .message-userArrow,
    .message-inner .message-userArrow {
        right: -(@xf-paddingLarge + 1);
    }
    .message-user {
        position: -webkit-sticky;
        position: sticky;
        top: 40px;
    }
}
/* Sticky user cell - END */

/* Add Widgets icon - Start */
.block-minorHeader::before{

    .block[data-widget-definition="eae_highlight_groups"] &{
        .m-faContent(@fa-var-user-secret);
    }
    
    .block[data-widget-definition="member_stat"] &{
        .m-faContent(@fa-var-trophy);
    }
    
        .block[data-widget-definition="thdonate_campaign"] &{
        .m-faContent(@fa-var-hand-holding-usd);
    }
    
        .block[data-widget-definition="snog_stylestats"] &{
        .m-faContent(@fa-var-star-half-alt);
    }
    
        .block[data-widget-definition="tpm_widget"] &{
        .m-faContent(@fa-var-user-graduate);
    }
    
}
/* Add Widgets icon - End */

/* Remove show open new Tab button from Lightbox */
#lg-new-window {
    display: none !important;
}

/* Bottom border to the editor toolbar */
.fr-box.fr-basic {
    border: 1px solid @xf-borderColorLight;
}

.fr-box.fr-basic .fr-toolbar.fr-top {
    border-bottom: 1px solid @xf-borderColorLight;
}

.fr-toolbar .fr-btn-grp.rte-tab--inactive {
    border-bottom-width: 0px;
    border-left: 1px solid @xf-borderColorLight;
}
/* Bottom border to the editor toolbar */

/* Hide postbit moods for mobile browser */
@media (max-width: @xf-messageSingleColumnWidth)
{
    .afMood--postbit
    {
        display: none;
    }
}
/* Hide postbit moods for mobile browser */

.fa-question:before {
    content: "\\f059" !important;
}
.fa-lightbulb-on:before {
    content: "\\f672" !important;
}
.fa-file-alt:before {
    content: "\\f15c" !important;
}' . $__templater->includeTemplate('af_as_extra.less', $__vars) . '
a[href^="#amp-broken-url:"] {
    color: red;
}
a[href^="#amp-broken-url:"]:before {
    font-weight: bold;
    font-size: 1.5em;
    content: \'broken link:\'
}

.unselectable
{
    display: none;
}

';
    if ($__vars['xf']['options']['wutime_reply_no_quote_enabled']) {
        $__finalCompiled .= '
    .actionBar-action.actionBar-action--replynoquote:before {
      content: "\\f1fa";
    }
';
    }
    $__finalCompiled .= '.tpm-controls
{
    .m-listPlain();
    margin-right: auto;

    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-height: 35px;
    max-width: 100%;

    > li
    {
        float: left;
        display: inline-block;
        margin-right: 5px;

        &:last-child
        {
            margin-right: 0;
        }
    }
}

.button.tpm-goButton
{
    font-size: @xf-fontSizeNormal;
    line-height: 1.5; // matches select
    min-width: 0;
}' . $__templater->includeTemplate('xfa_te.less', $__vars) . '
' . $__templater->includeTemplate('xfa_te.less', $__vars);
    return $__finalCompiled;
}
);

internal_data/code_cache/templates/l1/s2/public/extra.less.php

Code:
text/x-generic extra.less.php ( PHP script, ASCII text )

<?php
// FROM HASH: 85092d298bb7ebd31b2ec3779f7a5ed2
return array(
'code' => function($__templater, array $__vars, $__extensions = null)
{
    $__finalCompiled = '';
    $__finalCompiled .= '/* Sticky Sidebar for Top Posters of the Month */
';
    if ($__templater->func('property', array('ss_sidebar', ), false) == 'enabled') {
        $__finalCompiled .= '
@media (min-width: @xf-responsiveMedium) {
    [data-template="tpm_list"] .stickySidebar {
        position: -webkit-sticky;
        position: sticky;
        top: calc(47px + @{xf-ss_top});
    }
}
';
    }
    $__finalCompiled .= '

/* Fluid with boxed layout */
.p-pageWrapper {
    max-width: 95%;
    margin: 0 auto;
    background-color: #FFF;
    padding: 10px;
}

/* Separate Stickies Thread */
.structItemContainer-group--sticky:after{
   content: \'\';
   display: block;
   height: 10px;
   background: @xf-paletteColor4;
}

/* Display a "New" marker after the node title of unread posts */
.node--unread .node-title:after {
    content: \'New\';
    color: #ffffff;
    background: #ed7a16;
    display: inline-block;
    font-size: 9px;
    line-height: 2;
    border-radius: 3px;
    padding: 0 4px;
    margin-right: 4px;
    vertical-align: middle;
}
.node--unread .node-title:after {
    content: \'New\';
}
/* Display a "New" marker after the node title of unread posts */

/* Medal show in center for post message */
ul.bdMedal_userMedals { text-align: center; }

/* Hide Medals show post message from mobile view */
@media (max-width: 650px) { ul.bdMedal_userMedals { display: none; } }

/* XenForo 2.1.x Navtab menu FontAwesome 5 - Start */
.p-navEl a:before {
    .m-faBase();
    display: inline-block;
    text-align: center;
    margin-right:5px;
    border-radius:30px;
    line-height:normal;
}
.p-navEl a[data-nav-id=\'home\']:before {.m-faContent("@{fa-var-home}");}
.p-navEl a[data-nav-id=\'forums\']:before {.m-faContent("@{fa-var-comments}");}
.p-navEl a[data-nav-id=\'whatsNew\']:before {.m-faContent("@{fa-var-question}");}
.p-navEl a[data-nav-id=\'members\']:before {.m-faContent("@{fa-var-users}");}
.p-navEl a[data-nav-id=\'xfrm\']:before {.m-faContent("@{fa-var-download}");}
.p-navEl a[data-nav-id=\'xfmg\']:before {.m-faContent("@{fa-var-camera}");}
.p-navEl a[data-nav-id=\'imagehost\']:before {.m-faContent("@{fa-var-upload}");}
.p-navEl a[data-nav-id=\'snog_forms_nav\']:before {.m-faContent("@{fa-var-user-md}");}
.p-navEl a[data-nav-id=\'addonFlarePubAwards\']:before {.m-faContent("@{fa-var-medal}");}
.p-navEl a[data-nav-id=\'dbtechShop\']:before {.m-faContent("@{fa-var-shopping-cart}");}
.p-navEl a[data-nav-id=\'th_donate\']:before {.m-faContent("@{fa-var-hand-holding-usd}");}
/* Forums Subnav*/
.p-navEl a[data-nav-id=\'newPosts\']:before {.m-faContent("@{fa-var-search-plus}");}
.p-navEl a[data-nav-id=\'findThreads\']:before {.m-faContent("@{fa-var-search}");}
.p-navEl a[data-nav-id=\'searchForums\']:before {.m-faContent("@{fa-var-search}");}
.p-navEl a[data-nav-id=\'watched\']:before {.m-faContent("@{fa-var-eye}");}
.p-navEl a[data-nav-id=\'markForumsRead\']:before {.m-faContent("@{fa-var-eye-slash}");}
.p-navEl a[data-nav-id=\'thtrending\']:before {.m-faContent("@{fa-var-fire}");}
.p-navEl a[data-nav-id=\'viewConversation_nav_forum\']:before {.m-faContent("@{fa-var-sms}");}
.p-navEl a[data-nav-id=\'forumrules\']:before {.m-faContent("@{fa-var-exclamation-circle}");}
.p-navEl a[data-nav-id=\'siropuReferralContests\']:before {.m-faContent("@{fa-var-registered}");}
.p-navEl a[data-nav-id=\'PremiumMember\']:before {.m-faContent("@{fa-var-donate}");}
.p-navEl a[data-nav-id=\'awards\']:before {.m-faContent("@{fa-var-award}");}
/* WhatsNew Subnav */
.p-navEl a[data-nav-id=\'whatsNewPosts\']:before {.m-faContent("@{fa-var-pencil}");}
.p-navEl a[data-nav-id=\'whatsNewProfilePosts\']:before {.m-faContent("@{fa-var-rss}");}
.p-navEl a[data-nav-id=\'whatsNewNewsFeed\']:before {.m-faContent("@{fa-var-star}");}
.p-navEl a[data-nav-id=\'xfmgWhatsNewNewMedia\']:before {.m-faContent("@{fa-var-images}");}
.p-navEl a[data-nav-id=\'xfmgWhatsNewMediaComments\']:before {.m-faContent("@{fa-var-comments}");}
.p-navEl a[data-nav-id=\'xfrmNewResources\']:before {.m-faContent("@{fa-var-download}");}
.p-navEl a[data-nav-id=\'latestActivity\']:before {.m-faContent("@{fa-var-trophy}");}
.p-navEl a[data-nav-id=\'dbtShopNewItems\']:before {.m-faContent("@{fa-var-cart-plus}");}
/* XFMG Subnav */
.p-navEl a[data-nav-id=\'xfmgNewMedia\']:before {.m-faContent("@{fa-var-images}");}
.p-navEl a[data-nav-id=\'xfmgNewComments\']:before {.m-faContent("@{fa-var-comments}");}
.p-navEl a[data-nav-id=\'xfmgAddMedia\']:before {.m-faContent("@{fa-var-plus-square}");}
.p-navEl a[data-nav-id=\'xfmgYourContent\']:before {.m-faContent("@{fa-var-user}");}
.p-navEl a[data-nav-id=\'xfmgWatchedContent\']:before {.m-faContent("@{fa-var-eye}");}
.p-navEl a[data-nav-id=\'xfmgSearchMedia\']:before {.m-faContent("@{fa-var-search}");}
.p-navEl a[data-nav-id=\'xfmgMarkViewed\']:before {.m-faContent("@{fa-var-eye-slash}");}
/* Members Subnav */
.p-navEl a[data-nav-id=\'currentVisitors\']:before {.m-faContent("@{fa-var-user-plus}");}
.p-navEl a[data-nav-id=\'newProfilePosts\']:before {.m-faContent("@{fa-var-pencil}");}
.p-navEl a[data-nav-id=\'searchProfilePosts\']:before {.m-faContent("@{fa-var-user-secret}");}
.p-navEl a[data-nav-id=\'registeredMembers\']:before {.m-faContent("@{fa-var-restroom}");}
.p-navEl a[data-nav-id=\'eaeHighlighted\']:before {.m-faContent("@{fa-var-user-graduate}");}
.p-navEl a[data-nav-id=\'siropuEasyUserBanBanList\']:before {.m-faContent("@{fa-var-ban}");}
.p-navEl a[data-nav-id=\'siropuEasyUserBanManageBans\']:before {.m-faContent("@{fa-var-tools}");}
.p-navEl a[data-nav-id=\'tpm\']:before {.m-faContent("@{fa-var-street-view}");}
/* Awards Subnav */
.p-navEl a[data-nav-id=\'af_as_my_awards\']:before {.m-faContent("@{fa-var-award}");}
.p-navEl a[data-nav-id=\'af_as_pending_awards\']:before {.m-faContent("@{fa-var-wrench}");}
/* Shop Subnav */
.p-navEl a[data-nav-id=\'dbtechShopInventory\']:before {.m-faContent("@{fa-var-crown}");}
.p-navEl a[data-nav-id=\'dbtechShopBank\']:before {.m-faContent("@{fa-var-university}");}
.p-navEl a[data-nav-id=\'dbtechShopSteal\']:before {.m-faContent("@{fa-var-funnel-dollar}");}
.p-navEl a[data-nav-id=\'dbtechShopLottery\']:before {.m-faContent("@{fa-var-hand-holding-heart}");}
.p-navEl a[data-nav-id=\'dbtechShopTrade\']:before {.m-faContent("@{fa-var-compass}");}
/* Credits Subnav */
.p-navEl a[data-nav-id=\'dbtechCreditsTransactions\']:before {.m-faContent("@{fa-var-comment-dollar}");}
.p-navEl a[data-nav-id=\'dbtechCreditsUnlocked\']:before {.m-faContent("@{fa-var-unlock-alt}");}
.p-navEl a[data-nav-id=\'dbtechCredits\']:before {.m-faContent("@{fa-var-donate}");}
/* XenForo 2.1.x Navtab menu FontAwesome 5 - End */

/* UserExtras show in center on Post message */
.message-userExtras { text-align: center; }

/* Change the font size for Paid Registrations accountype IDs: 4 */
div.accountType[data-id="4"] div.price
{
    font-size: .85em;
}

/* Individual Boxed for Shop Gift START */
.message-userExtras dl, .dbtechShopPostbit.dbtechShopPostbit-items
{
    background-color: @xf-contentBg;
    padding: @xf-paddingSmall @xf-paddingMedium;
    border: 1px solid @xf-borderColor;
    border-radius: @xf-borderRadiusMedium;
    margin-bottom: 3px;
}
/* Individual Boxed for Shop Gift END */

/* Sticky user cell - Start */
@media (min-width: ' . ($__templater->func('property', array('responsiveMedium', ), false) + 1) . 'px )
{
    .message-cell.message-cell--user section .message-userArrow,
    .message-inner .message-userArrow {
        right: -(@xf-paddingLarge + 1);
    }
    .message-user {
        position: -webkit-sticky;
        position: sticky;
        top: 40px;
    }
}
/* Sticky user cell - END */

/* Remove show open new Tab button from Lightbox */
#lg-new-window {
    display: none !important;
}

/* Bottom border to the editor toolbar */
.fr-box.fr-basic {
    border: 1px solid @xf-borderColorLight;
}

.fr-box.fr-basic .fr-toolbar.fr-top {
    border-bottom: 1px solid @xf-borderColorLight;
}

.fr-toolbar .fr-btn-grp.rte-tab--inactive {
    border-bottom-width: 0px;
    border-left: 1px solid @xf-borderColorLight;
}
/* Bottom border to the editor toolbar */

/* Hide postbit moods for mobile browser */
@media (max-width: @xf-messageSingleColumnWidth)
{
    .afMood--postbit
    {
        display: none;
    }
}
/* Hide postbit moods for mobile browser */' . $__templater->includeTemplate('af_as_extra.less', $__vars) . '
a[href^="#amp-broken-url:"] {
    color: red;
}
a[href^="#amp-broken-url:"]:before {
    font-weight: bold;
    font-size: 1.5em;
    content: \'broken link:\'
}

.unselectable
{
    display: none;
}

';
    if ($__vars['xf']['options']['wutime_reply_no_quote_enabled']) {
        $__finalCompiled .= '
    .actionBar-action.actionBar-action--replynoquote:before {
      content: "\\f1fa";
    }
';
    }
    $__finalCompiled .= '.tpm-controls
{
    .m-listPlain();
    margin-right: auto;

    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-height: 35px;
    max-width: 100%;

    > li
    {
        float: left;
        display: inline-block;
        margin-right: 5px;

        &:last-child
        {
            margin-right: 0;
        }
    }
}

.button.tpm-goButton
{
    font-size: @xf-fontSizeNormal;
    line-height: 1.5; // matches select
    min-width: 0;
}' . $__templater->includeTemplate('xfa_te.less', $__vars) . '
' . $__templater->includeTemplate('xfa_te.less', $__vars);
    return $__finalCompiled;
}
);
 
Yeah, so it's this bit, the same issue we had in Nodes:

PHP:
@media (min-width: ' . ($__templater->func('property', array('responsiveMedium', ), false) + 1) . 'px )
{
    .message-cell.message-cell--user section .message-userArrow,
    .message-inner .message-userArrow {
        right: -(@xf-paddingLarge + 1);
    }
    .message-user {
        position: -webkit-sticky;
        position: sticky;
        top: 40px;
    }
}

The ($__templater->func('property', array('responsiveMedium', ), false) + 1) bit will be doing something like 650px + 1 which is why it's erroring.

I can't actually find this in the extra.less originally posted, so it may be part of an include. Search for message-userArrow in all templates, and in a template just above it there will probably be this:

@media (min-width: {{ property('responsiveMedium') + 1 }}px ) {

Change that to:

@media (min-width: calc({{ property('responsiveMedium') }} + 1px) ) {

May not be exactly that as it's just guessing what the template has, but should be close enough. This will create CSS of calc(650px + 1px) which means PHP isn't adding the numbers together but will have the same result when the browser renders it.
 
Yeah, so it's this bit, the same issue we had in Nodes:

PHP:
@media (min-width: ' . ($__templater->func('property', array('responsiveMedium', ), false) + 1) . 'px )
{
    .message-cell.message-cell--user section .message-userArrow,
    .message-inner .message-userArrow {
        right: -(@xf-paddingLarge + 1);
    }
    .message-user {
        position: -webkit-sticky;
        position: sticky;
        top: 40px;
    }
}

The ($__templater->func('property', array('responsiveMedium', ), false) + 1) bit will be doing something like 650px + 1 which is why it's erroring.

I can't actually find this in the extra.less originally posted, so it may be part of an include. Search for message-userArrow in all templates, and in a template just above it there will probably be this:

@media (min-width: {{ property('responsiveMedium') + 1 }}px ) {

Change that to:

@media (min-width: calc({{ property('responsiveMedium') }} + 1px) ) {

May not be exactly that as it's just guessing what the template has, but should be close enough. This will create CSS of calc(650px + 1px) which means PHP isn't adding the numbers together but will have the same result when the browser renders it.

This is my extra.less template code:

Code:
@media (min-width: {{ property('responsiveMedium') + 1 }}px )
{
    .message-cell.message-cell--user section .message-userArrow,
    .message-inner .message-userArrow {
        right: -(@xf-paddingLarge + 1);
    }
    .message-user {
        position: -webkit-sticky;
        position: sticky;
        top: 40px;
    }
}

Does this code are correct?

Code:
 @media (min-width: calc({{ property('responsiveMedium') }} + 1px) )
{
    .message-cell.message-cell--user section .message-userArrow,
    .message-inner .message-userArrow {
        right: -(@xf-paddingLarge + 1);
    }
    .message-user {
        position: -webkit-sticky;
        position: sticky;
        top: 40px;
    }
}
 
Back
Top Bottom