ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Image path not displayed

August 03, 2012 11:28am

Subscribe [4]
  • #1 / Aug 03, 2012 11:28am

    CBB

    12 posts

    Hi,
    Recently upgraded from 1.7.3 to 2.5.2
    My entries have several fields with a path to an image or video. With EE.x this was a LG Image Manager field. I found no replacement yet.=( The field contains e.g. ‘/uploads/Jubilaris_25-300.jpg’.
    I use ImageSizer for resizing. After the update this wasn’t functioning anymore. After some experimenting with no result I bought CE Image. This also showed no image! Finally put an ordinary <img> html tag in my template. No result. Quite a bit frustating.

    The field has filetype File. Simply displaying the field {image_path} gives nothing
    After changing it to Text Input the path is displayed. No wonder that my plugins don’t work!

    EE changes to handling of a field depending on the fieldtype. I don’t like this.

    What is going on? This takes a lot of time where the upgrade already lasts longer then expected and I’m only just at 25% of my templates.

    In EE 1.x everything worked like a charm. In fact nothing changed much. Only the fieldtype, so why the %5@*^-{ is this going wrong?

  • #2 / Aug 04, 2012 8:11am

    CBB

    12 posts

    Hi,

    I have some more information which exactly shows what’s wrong. See the attached images for the rendered page.
    The code:

    {exp:channel:entries channel="actueel" orderby="date" limit="1" offset="1" category="4|5" status="{actueel_index_status}"}
     .................
      {if nw_image_intro_align == "right above" OR nw_image_intro_align == "left above" OR nw_image_intro_align == "center above"}
       {if nw_image_intro}
        TESTING: FIELDTYPE 'nw_image_intro' AS <strong>'File'</strong><br>
        Value of 'nw_image_intro': {nw_image_intro}<br><hr>
        Html img tag:<br>
        <a href="https://intranet.knooble.com{nw_image_intro}m0bKZFCwLqkWx9RzVYE82BPDoC61aHYetypography_img_src_end width=300 ">https://intranet.knooble.com{nw_image_intro}m0bKZFCwLqkWx9RzVYE82BPDoC61aHYetypography_img_src_end width=300 </a><br>
        With ce_img:<br>
        {exp:ce_img:single src="https://intranet.knooble.com{nw_image_intro}" max="300"}<br>
        TO SHOW THAT THE IMAGE IS THERE:
        {exp:ce_img:single src="https://intranet.knooble.com/uploads/Jubilaris_25-300.jpg" max="300"}<br>
       {/if}
      {/if}
     .................
    {/exp:channel:entries}

    As you can see in the attached images the parser produces a different result based on the fieldtype. It takes a while before I figured this out.

    The code of the rendered pages also has something strange when fieldtype ‘Text Input’ is used. There are strange sign appended. Before and after the field. “-percent-3Cp-percent-3E”. I replaced the sign of percent by the text. Don’t know where they are coming from.
    When fieldtype ‘File’ is used nothing is appended because nothing is produced by the parser.

     

  • #3 / Aug 04, 2012 8:21am

    CBB

    12 posts

    One more addition: on other parts of the page images are shown but they use another way (javascript) for displaying and the imagesource is partly constructed with a field (author_id) and the images are in an other folder.

  • #4 / Aug 06, 2012 11:43am

    Shane Eckert

    7174 posts

    Hello CBB,

    I am sorry to hear you are running into this snag.

    If I understand you correctly, using CE you are not getting the results desired?

    Is nw_image_intro the file field name from Channel Fields?

    In a new template if you just put {nw_image_intro} what happens?

    Thank you,

  • #5 / Aug 07, 2012 4:55am

    CBB

    12 posts

    Hi,

    -1-
    There’s something really creepy going on. Sometimes images are displayed, sometimes not. I just had a clear example that EE is hassling with the image paths. Have a bunch of entries displayed in 5x5 array with the {nw_image_intro} field (fieldtype as Text Input). At first no images are displayed. Then I open one of them to edit. Saving, but I have nothing changed in the data of the entry. Then reload my page with the 5x5 and whooops! the image is displayed and all the entries before my edited entry to. Two newer entries are not displayed. So I open them to, saving and yes they are also displayed. In the meantime nothing has changed in my template. Just opening en saving changes the way the images are displayed. It’s again EE hasling with code without me knowing. I’m pretty much done with this.

    -2-
    Another strange thing is that a made a few file upload preferences but the (filedir_#} isn’t parsed. So (filedir_11} displays (filedir_11} and not ‘https://intranet.knooble.com/uploads/actueel/.960_2012_07/’. I checked the database and the path is clearly there but not parsed.

    BTW
    I used curly brackets around filedir_11 and got your path! http://expressionengine.com/files/addon_images/

  • #6 / Aug 07, 2012 5:47am

    CBB

    12 posts

    Hi,

    Could you please give me a clue what is going on with this images. I now have about 70% of the entries showing alright but still a 30% that give a problem. The imgsizer plugin gives a error when encountering an entry with the ‘wrong’ image path data. (The path itself is not wrong, the way EE handles it is wrong).

    A PHP Error was encountered
    Severity: Notice
    Message: getimagesize() [function.getimagesize]: Read error!
    Filename: imgsizer/pi.imgsizer.php
    Line Number: 153

    It’s impossible for my to check all the entries whether they display the images correct. If I miss one then the page on which the faulty image should be displayed gives an error.

    This all surely can’t be the intention off upgrading to a “newer” version of EE =(

  • #7 / Aug 07, 2012 6:25am

    CBB

    12 posts

    Finally getting an idea: the good old terrifying fieldtype field for the fields containing an imagepath is not equally filled. Some have ‘none’ others not. How can I easily fill the fieldtype of the existing fields with ‘none’? I know a little mysql but not enough to do this kind of changes.

  • #8 / Aug 07, 2012 7:08am

    CBB

    12 posts

    Think I’ve got the most out of the way by setting the field_ft_# to none.
    Used this

    UPDATE `exp_channel_data` SET `field_ft_111` = "none"

    Careful to make a backup of your db first.

  • #9 / Aug 08, 2012 5:14am

    CBB

    12 posts

    ImgSizer still had some problems with obtaining the right path. Changed all to CE Image and now images are displayed fine.
    But…. now having great difficulties with ‘the fieldtype’ and ‘Ee native filemanager’ and ‘getting a clean path in a field’. I will explain in a separate post.

  • #10 / Aug 08, 2012 11:12am

    Shane Eckert

    7174 posts

    Hey CBB,

    Sounds like things are working now. Is that correct?

    Thank you,

  • #11 / Aug 16, 2012 11:26am

    Morten Norli

    3 posts

    Hi there,
    I have the same problem with the paths to images manipulated in File Upload Preferences. The path isn’t parsed, so the output is “{filedir_X}image.jpg” instead of the path to the manipulated version of the image. I’ve noticed that has been an issue with this in v2.4.0 MSM, but I have a clean EE 2.5.2 installation (not MSM). I have no other image manipulation plugins/extensions installed. Any ideas?

    Cheers,
    /M

  • #12 / Aug 17, 2012 12:30pm

    Shane Eckert

    7174 posts

    Hello Morten,

    I am sorry to hear you are running into this problem.

    Can you show me your template code?

    This is a 2.5.2 version install or 2.4?

    Thank you,

  • #13 / Aug 22, 2012 4:39pm

    jtnick

    29 posts

    Not to impose on this thread, but I just recently updated a site from 2.2.2 -> 2.5.2 and have a similar issue.

    I can no longer update any of my categories without facing a situation where my category image path gets altered. Doing so replaces the previous category image field path with a “{filedir_x}image.jpg” in the database column. I’ve found no way around this. Each of these approx. 200 categories had image paths added manually in 2.2.2. The conversion to 2.5.2 added integration with the file manager and I’m afraid this is where the conflict was created.

    Please advise.

    Thanks!
    Nick

  • #14 / Aug 22, 2012 4:47pm

    jtnick

    29 posts

    I should also add that the problem lies in the templates. It’s outputting “{filedir_x}image.jpg” instead of “path/to/image.jgg”. The templates are no longer able to parse the correct path on output. Every category I’ve updated has this issue. Those categories where I have not updated the record are still displaying just fine because the full path is still found in the database column.

  • #15 / Aug 23, 2012 2:48pm

    Shane Eckert

    7174 posts

    Hey jtnick,

    Indeed, you have stumbled upon a known bug.

    Can you try the fix and let me know?

    Thank you,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases