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.

custom file channel field is creating a relative path

June 04, 2012 12:15am

Subscribe [2]
  • #1 / Jun 04, 2012 12:15am

    kylecamping

    3 posts

    For some reason, when i try and assign image files to my channel entries, the url path that is generating is relative to the root directory and not an absolute file path like usual. I have used EE2.5 before with no issues, but this time around i am stuck.

    When viewing the image in the file manager, it works fine - and even when i upload the file in the entry for the first time, it is fine. but when i go back to edit the entry, it can’t locate the file because the path it is using is “_thumb/image.jpg”, NOT “http://domain.com/files/images/_thumb/image.jpg” (which is should be doing). So when i try and save my edits, the CP bounces an error that it can’t find the image.

    Really at a loss here, i have used the same EE build before with no issues, but there must be a config setting that is broken somewhere. Any help is greatly appreciated.

  • #2 / Jun 05, 2012 7:46am

    e-man

    1816 posts

    I’d start by checking that your settings are complete and correct in the file manager -> upload directories.

  • #3 / Jun 05, 2012 11:24am

    kylecamping

    3 posts

    i double checked and the upload directory is correct. Also, i can confirm this because when i upload images through the CP, they do go to the proper location on the server. The problem really is when the CP is trying to find and render the image. it is not using the proper “path”. I tested this by using the tags: {main_image}{path}{/main_image} (which generates nothing). It should generate “http://domain.com/files/images/” - so I am pretty sure this is at the heart of the problem somehow.

  • #4 / Jun 05, 2012 11:40am

    kylecamping

    3 posts

    I did some more digging and in my other site (that works) in the database table “exp_channel_data”, images are prefixed with “filedir_1” - and in the current site i am working on (that is broken), i am NOT seeing this prefix tag. How do I get the CP to add this prefix when i save a new channel entry?

  • #5 / Jun 28, 2012 8:08pm

    kylecamping

    3 posts

    ***SOLVED***

    For some reason the EE “/themes/javascript” directory had been corrupted in some way when i uploaded via FTP. This caused the js in the control panel to act funky. So, all i did was download a clean copy of EE and updated that folder. Problem was resolved immediately.

    Shout out to Jarrett Barnett for solving this same problem in another thread, you can read it here:

    http://ellislab.com/forums/viewthread/217496/

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

ExpressionEngine News!

#eecms, #events, #releases