Jump to content
thirty bees forum
  • 0

Purpose of Image in Bees Blog Post?


jfnewell1965

Question

12 answers to this question

Recommended Posts

  • 0

I have created two posts.

In each post I have added an image.

I can find all of these images in "img/beesblog/posts"....they are not in "themes/{theme}/img/......" which is where I really expected them.

Anyway.....I can find all of these images in "img/beesblog/posts", but both my "recent posts" and the posts in the blog itself look as shown below, with no image...

Home Page Recent Posts Display:
image.png.04e9d8c9671305f2af17eb59544095ea.png

Blog Page Display:
image.png.da68cfe9a070175ff8c4421810a2db2f.png

Edited by jfnewell1965
Link to comment
Share on other sites

  • 0

As a test, just to try and investigate any other possibilities, I reverted back to the default community theme.  It made no difference....the images still don't show.
My assumption is that if a properly named image is not found at the specified image path, then no image is displayed...and therefore I am guessing that my image path info is messed up.

But I don't know how to fix it.

Any ideas out there?

Link to comment
Share on other sites

  • 0

@tommat  Hi...I tried that, but since it does not find an image wherever is looking, it does not get included in the page and therefore can't be seen on an inspection.  Maybe the developer tools have additional features I don't know how to use, but with simple inspection, all I can see is the rendered page (See below). 

Now, I did dig into the code a little, and in /modules/beesblogrecentposts/views/templates/hooks/home.tpl, I can see it "assembling" the image path so to speak with the following code:
 

<a class="beesblogrecentposts-title" href="{$post->link|escape:'htmlall':'UTF-8'}" title="{$post->title|escape:'htmlall':'UTF-8'}">
                                        {assign var=imagePath value=Media::getMediaPath(BeesBlog::getPostImagePath($post->id))}
                                        {if ($imagePath)}
                                        <img class="img-responsive" src="{$imagePath|escape:'htmlall':'UTF-8'}" title="{$post->title|escape:'htmlall':'UTF-8'}" />
                                        {/if}
                                        {$post->title|escape:'htmlall':'UTF-8'}
                                    </a>

But again, I don't know enough to understand where "Media::getMediaPath" or "BeesBlog::getPostImagePath" actually gets the value from.   I am assuming the value is stored somewhere, but I can't find it.

In the old days (when dinosaurs roamed the earth) and I wrote some simple programs in Visual Basic, if I questioned a variable, I would just put a message box popup into the code to see what the variable was at different points in the code.......but I could not figure out a way to do that in this case. 

I also found other code in /modules/beesblog/classes/BeesBlogPost.php, such as:
 

public static function getImagePath($id, $type = 'post_default')
    {
        $baseLocation = _PS_IMG_DIR_.'beesblog/posts/';

But at my knowledge level, all that does is introduce another variable I don't understand how to chase down.

 

What I can see with inspect:

<article>
                        <div class="col-xs-12 col-sm-4 col-md-3">
                            <div class="beesblogrecentposts-content">
                                <h3 class="post-name">
                                    <a class="beesblogrecentposts-title" href="https://www.cigarboxguitarfactory.com/blog/install-markers" title="Installing Fret Side Markers">
                                                                                                                        Installing Fret Side Markers
                                    </a>
                                </h3>
                                <p> Drill hole.  Install marker. </p>
                                <p>
                                    <i class="icon icon-calendar"></i> Mar 24, 2019
                                    <i class="icon icon-eye"></i> 10
                                </p>
                                <p><a class="btn btn-primary" href="https://www.cigarboxguitarfactory.com/blog/install-markers" title="Installing Fret Side Markers">Read More</a></p>
                            </div>
                        </div>
</article>

 

 

Edited by jfnewell1965
Link to comment
Share on other sites

  • 0

I have now. 

I have uninstalled the module, made sure it was the latest module, and then reinstalled the module.

Beyond that, I unhooked everything "Bee Blog" related, and re-hooked it.

Then I made a category, and then an article under that category along with selecting an image for the article.

Just so we are clear, here is again what I am getting, along with what I am expecting.  The "What I am Expecting" is just a mock-up, as I have no idea what it really looks like.
image.png.bbaec6a021264f8832d8d6e873c259f0.png

Edited by jfnewell1965
Link to comment
Share on other sites

  • 0

@jfnewell1965 I have reproduced the problem, and found a solution.

Go to your modules page, and delete Bees Blog Recent Posts module. Not the Bees Blog itself.

After you delete it, you will notice that it will immediately reinsert itself into the module list. That's because Bees Blog modules contains different version of this module as a submodule, and immediately copies its own version thirtybees module directory. So by removing the module, you are actually performing module update 🙂 funny, isn't it...

Now, install this module, and it should start to work.

 

image.thumb.png.e87a2d6f9eeff61a826b50bbe804abe9.png

Link to comment
Share on other sites

  • 0

@datakick You know...when I first deleted it (as a test to see what reinstalling did), I noticed that it seemed to come back like you say, so I deleted it a second time and it went away.  Then I deleted the rest and reinstalled.

So now, trying to follow your fix, I went to delete and then reinstall as you say, but....

Now it won't delete.   It won't delete, it won't uninstall, it won't anything...like it has decided to stay for life!

I hate to do anything further until I hear your ideas, because I don't know how much a deeper a hole I might dig for myself.

It seems like you found a fix, but now I can't implement that fix.....any ideas?

Link to comment
Share on other sites

  • 0

This turned out to be an extension related issue.

If the file extension you upload is upper case, then it will not show up.

My files were named "xxxx.JPG" and not "xxx.jpg".

Changing the extension from upper to lower case solved the problem.

All thanks to @datakick for helping me find this resolution.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...