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.

Can't view images from entry on first MSM site on second MSM site

February 21, 2012 8:58am

Subscribe [4]
  • #1 / Feb 21, 2012 8:58am

    Ben Parizek

    128 posts

    I’m up to date and using the latest (2.4).

    I have a channel on MSM site 1.  It has images. I’m trying to output those entries on MSM site two.  Nothing.

    The paths are good. I can output things just fine on MSM site one.  I ran into this first using Wygwam, but it’s also happening with the basic Textarea field.

    Digging into the code it seems that Typography library is only checking for “filedir_” IDs based on the current site (EE_Typography.php around line 226-229). So, when MSM site 2 is looking at all the filedir options for MSM site 2, it doesn’t find any that match the filedir_’s stored int he MSM site 1 entry, and just outputs the tag unparsed {filedir_x}.

    Is that working as it should?  I’d expect this isn’t desired functionality, but maybe I’m just overlooking something.  Would love any solutions you can offer!

  • #2 / Feb 22, 2012 1:59pm

    Dan Decker

    7338 posts

    Hi Ben,

    You can tell the channel entries tag which site to pull from with the site= parameter.

    Are you using that in your channel entries tag?

    {exp:channel:entries channel="channel" site="default_site"}

    Can you share you channel entries code?

    Cheers,

  • #3 / Feb 22, 2012 2:18pm

    Ben Parizek

    128 posts

    Yup.  I’m specifying that.  Everything is displaying just fine, except for the images.

    {exp:channel:entries 
     site="site_short_name"
     category="1"
     channel="channel_name" 
     limit="10"
     show_future_entries="no"
     }

    I’ve currently using low_replace to find and replace the unparsed {filedir_x} values and add the right paths, but this seems hackish and isn’t very portable between different servers.

  • #4 / Feb 22, 2012 2:21pm

    Ben Parizek

    128 posts

    For reference, this is what I’m doing to temporarily solve the issue until we find a better way to handle this.

    {exp:low_replace find="https://ellislab.com/asset/images/pronet-logo/" replace="http://website.com/content/images/"}{textarea_or_wysiwyg_field}{/exp:low_replace}
  • #5 / Feb 24, 2012 2:51pm

    Dan Decker

    7338 posts

    Hey Ben,

    So, we are both right in thinking this *should* work, but alas, there is a bug.

    Upside? There is a solution outlined in the bug report.

    Sorry for the confusion!

    Cheers,

  • #6 / Feb 25, 2012 11:26pm

    Ben Parizek

    128 posts

    Hi Dan,

    I’ve updated the code based on that bug report but that doesn’t seem to be the problem.  That bug seems to be related to the File Module.  I’m just trying to include an image in a textarea or wysiwyg field and the {filedir_x} value is not being parsed.

  • #7 / Feb 27, 2012 1:44pm

    Dan Decker

    7338 posts

    OK Ben,

    I’m going to take this up to Kevin for a closer look. We’ll be contacting you via email.

    Cheers,

  • #8 / Feb 28, 2012 1:45pm

    Dan Decker

    7338 posts

    Hi Ben,

    Just checking in to see if you’ve had a chance to respond to the email?

    Cheers,

  • #9 / Feb 28, 2012 1:59pm

    Ben Parizek

    128 posts

    Just got to it Dan.  I’ll send some notes as a reply to the request email.

  • #10 / Feb 29, 2012 2:14pm

    Dan Decker

    7338 posts

    Hi Ben,

    Excellent!

    To the folks who following along, we’ll be working with Ben in private and post the resolution here when we are all wrapped up.

    Cheers,

  • #11 / Mar 02, 2012 10:01am

    Guido Neele

    8 posts

    Dan,

    I ran into the same problem and think I solved it by changing library\Functions.php line 2847 from ...

    $upload_prefs = $this->EE->file_upload_preferences_model->get_file_upload_preferences();

    ... to ...

    $upload_prefs = $this->EE->file_upload_preferences_model->get_file_upload_preferences(NULL, NULL, TRUE);

    This way the {filedir_n} strings are parsed correctly but I don’t know what other effects this change might have.

    Regards


    James

     

  • #12 / Mar 05, 2012 5:06am

    Embody_Bruce

    76 posts

    Having this problem coincided with me attempting to do a first MSM sharing of images and posts. Thought I was going mad for a bit there.

    Anyway ... James Bomb’s solution worked for me (more or less, one or two images are still refusing to show). Can someone at EE check it is okay to use?

    Thanks James.

  • #13 / Mar 06, 2012 1:48pm

    Kevin Smith

    4784 posts

    Hey guys,

    My apologies we didn’t catch this sooner, but yes, James’s solution is the right one. You can see the bug report with the solution here.

    Does applying that fix resolve this for everyone?

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

ExpressionEngine News!

#eecms, #events, #releases