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

XF 1.1 What's going on? Illegal String Offset

3rd AnGle

Well-known member
#1
What kind of a sick error is this? I don't know if this caused the problem..We moved from one server to another.. and had imported the sql dump.


Template Errors: thread_view

  1. Illegal string offset 'thumbnailUrl' in /home2/hippy/public_html/mbbbbnnnns.com/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 2015:
    2014: <li id="' . (($__compilerVar73) ? ('AttachedFileTemplate') : ('attachment' . htmlspecialchars($__compilerVar74['attachment_id']))) . '"
    2015: class="AttachedFile ' . (($__compilerVar74['thumbnailUrl']) ? ('AttachedImage') : ('')) . ' secondaryContent">
    2016:
  2. Illegal string offset 'thumbnailUrl' in /home2/hippy/public_html/mddfffffks.com/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 2019:
    2018: ';
    2019: if ($__compilerVar74['thumbnailUrl'])
    2020: {
  3. Illegal string offset 'filename' in /home2/hippy/public_html/mdddsssks.com/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 2034:
    2033: $__compilerVar75 .= '
    2034: <!--<img src="' . XenForo_Template_Helper_Core::styleProperty('imagePath') . '/xenforo/widgets/page.png" alt="' . htmlspecialchars($__compilerVar74['filename']) . '" />-->
    2035: <span class="genericAttachment"></span>
  4. Illegal string offset 'filename' in /home2/hippy/public_html/manrrrrssks.com/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 2042:
    2041: <div class="AttachmentText">
    2042: <div class="Filename"><a href="' . XenForo_Template_Helper_Core::link('attachments', $__compilerVar74, array()) . '" target="_blank">' . htmlspecialchars($__compilerVar74['filename']) . '</a></div>
    2043:
 

3rd AnGle

Well-known member
#4
oh no... looks like trouble. I am still on xF 1.1.2 and i don't know what version of PHP my host is running. Probably PHP 5.4. Looks like i have gotta wait.

And thanks for your help Brandon.
 

Chris D

XenForo developer
Staff member
#5
In XF 1.1.3 the error still shows but only if debug mode is switched on.

So the quickest solution maybe to upgrade to XF 1.1.3.

There's not many reasons to not to. It wasn't exactly ground-breaking in terms of new functionality and breaking changes so the chance that anything else will break as a result is pretty slim.
 

Luke F

Well-known member
#6
oh no... looks like trouble. I am still on xF 1.1.2 and i don't know what version of PHP my host is running. Probably PHP 5.4. Looks like i have gotta wait.

And thanks for your help Brandon.
My live site runs 1.1.2, it's just as easy to patch it for 5.4 support
 

3rd AnGle

Well-known member
#9
ok.. i followed Ragtek's solution and removed this "<xen:set var="$attachment"></xen:set>" from Attachment editor template... and yes everything "looks" normal now :D Whether it affects the functionality or not.

<Edit: Thanks everyone for the help>
 

3rd AnGle

Well-known member
#10
i running into trouble here again.. looks like the problem is with the UserAlbums add-on.
Template Errors: xfr_useralbums_add_images

  1. Illegal string offset 'thumbnailUrl' in /home/hiipp/public_html/abcdfc.com/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 210:
    209: <li id="' . (($__compilerVar4) ? ('AttachedFileTemplate') : ('attachment' . htmlspecialchars($__compilerVar5['image_id']))) . '"
    210: class="AttachedFile ' . (($__compilerVar5['thumbnailUrl']) ? ('AttachedImage') : ('')) . ' secondaryContent">
    211:
Anyone one knows what kind of edit i have to make again? I have looked up the xfr_useralbums_add_images template but not sure what should be edited..

Help would be highly appreciated
 

3rd AnGle

Well-known member
#11
This is the template i am refering to
Code:
<xen:title>{xen:phrase xfr_useralbums_add_delete_images}</xen:title>
<xen:h1>{xen:phrase xfr_useralbums_add_delete_images}</xen:h1>
 
<xen:navigation>
    <xen:breadcrumb source="$breadCrumbs" />
</xen:navigation>
 
<form action="{xen:link 'useralbums/save-images', $album}" method="post"
    class="xenForm AutoValidator"
    data-redirect="on"
>
    <fieldset>
 
        <dl class="ctrlUnit">
            <dt></dt>
            <dd><xen:include template="xfr_useralbums_image_upload_button" /></dd>
        </dl>
 
        <xen:if is="{$imageParams}">
            <dl class="ctrlUnit AttachedFilesUnit">
                <dt><label for="ctrl_uploader">{xen:phrase xfr_useralbums_uploaded_images}:</label></dt>
                <dd><xen:include template="xfr_useralbums_image_editor" /></dd>
            </dl>
        </xen:if>
    </fieldset>
 
    <dl class="ctrlUnit submitUnit">
        <dt></dt>
        <dd>
            <input type="submit" value="{xen:phrase save}" accesskey="s" class="button primary" />
        </dd>
    </dl>
    <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>
Any idea which line could probably be removed to circumvent the issue?
 

cclaerhout

Well-known member
#12
You might need to check the include template (xfr_useralbums_image_editor) as well and may be more in particular this part of the code:
Code:
<xen:set var="$image"></xen:set>
Edit: if it doesn't work, you should directly post in this addon thread to notice the problem to the developer.

Edit2: you should check also this template: xfr_useralbums_image_editor_image
I would make actually more sense with your error message.