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

XF 1.5 Template comparision: is this normal?

Discussion in 'XenForo Questions and Support' started by imthebest, Sep 25, 2015.

  1. imthebest

    imthebest Formerly Super120

    On template warning_info I have removed the following block:

            <xen:if is="{$canExpireWarning}">
                <form action="{xen:link warnings/expire, $warning}" method="post">
                    <dl class="ctrlUnit">
                            <li><label><input type="radio" name="expire" value="now" checked="checked" /> {xen:phrase expire_now}</label></li>
                            <li><label><input type="radio" name="expire" value="future" id="ExpireWarningFuture_{$warning.warning_id}" class="Disabler" /> {xen:phrase expire_in_time}:</label>
                                <ul id="ExpireWarningFuture_{$warning.warning_id}_Disabler">
                                        <input type="text" size="5" name="expiry_length" value="1" class="textCtrl autoSize" />
                                        <select name="expiry_unit" class="textCtrl autoSize">
                                            <option value="hours">{xen:phrase hours}</option>
                                            <option value="days" selected="selected">{xen:phrase days}</option>
                                            <option value="weeks">{xen:phrase weeks}</option>
                                            <option value="months">{xen:phrase months}</option>
                    <dl class="ctrlUnit submitUnit">
                            <input type="submit" value="{xen:phrase update_warning}" class="button primary" />
                    <input type="hidden" name="_xfConfirm" value="1" />
                    <input type="hidden" name="redirect" value="{$redirect}" />
                    <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
    However the template comparison feature says this:



    Is this normal? If so, it ends being pretty confusing.

  2. Chris D

    Chris D XenForo Developer Staff Member

    Yeah this is normal. You get used to it when working with diff comparisons. There's no programmatical way to know exactly which part of the code you removed when there's a duplicate piece of code at the beginning and the end of said removal.
  3. imthebest

    imthebest Formerly Super120

    You mean that there are tools that help you to determine where exactly you started to edit a template? Or you mean that this is a "design issue" of every template comparison system that soon or later I'll get used to?

  4. Chris D

    Chris D XenForo Developer Staff Member

    The latter - most if not all will likely show some discrepancy at times in this situation.
  5. Mike

    Mike XenForo Developer Staff Member

    To put it another way: what you say you removed and what the diff reports as being removed are 100% equivalent. There's no way to know the action that was taken. The "path" taken is based on various technical reasons.

Share This Page