Jump to content

Smartblog is not showing the content of the blogs


Recommended Posts

Hi there, I'm using Smartblog too and also have problems.

 

When adding a new post, it's not showing up on the frontpage for clients that are not logged in.

 

But when I go to the blogpost url, www.mydomain.nl/smartblog.html, clients that are not logged in can see all the posts.

 

Only when I log in as a customer, the blogpost appears on the frontpage.

 

I also don't have a Contentbox Module. But looks like my problem has to do with logged in vs. not logged in clients.

 

How can I fix this?

PS: 1.6.0.9

Theme: EDA

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...
  • 2 months later...

Hello, I too was having this problem with Smartblog and upon investigating on the module code for a bit found that it had to do with the friendly URL; when you click a post to see its contents it takes you to a URL that probably shows its id and its name (e.g. 4-this-post-is-an-example); my solution was to open SmartBlogPost.php file inside /modules/smartblog/classes and then write a regular expression to extract the id that was wrongly being passed to the getPost function.

 

I'll leave the steps for you to try (in case you're still having this issue):

  1. Open SmartBlogPost.php in /modules/smartblog/classes
  2. Add a new line between lines 64 and 65 with this code:
    preg_match('/^[\d]+/', $id_post, $id_post);
    $id_post = $id_post[0];
  3. Those lines must be inserted right before line 65 (which starts with $sql = 'SELECT.........)
  4. Save the file
  5. This solution is working with friendly url's so while one probable solution would be to change the setting for friendly url or link rewrite on the module, i could not find any of those options; maybe the module developer will get this fixed in a future release, for now this seems to do the trick.

 

Best of luck!,

Edited by memovillalobos (see edit history)
  • Like 2
Link to comment
Share on other sites

  • 1 month later...

Hi guys,

 

I would love to use Smartblog as it looks awesome but despite following all the advice above (including editing the php file which was heartshopping for a very amateur coder like me) the blog still does not display content. Here are the links - to the blog posts page (where they show) and click any actual post and they do not. 

 

http://www.hairmywords.com/smartblog.html

 

Any help would be appreciated - if I can't solve this soon will have to use a paid module whereas this really should do fine!

 

Thanks

 

Joshua

 

 

Link to comment
Share on other sites

  • 1 month later...

Hello, I too was having this problem with Smartblog and upon investigating on the module code for a bit found that it had to do with the friendly URL; when you click a post to see its contents it takes you to a URL that probably shows its id and its name (e.g. 4-this-post-is-an-example); my solution was to open SmartBlogPost.php file inside /modules/smartblog/classes and then write a regular expression to extract the id that was wrongly being passed to the getPost function.

 

I'll leave the steps for you to try (in case you're still having this issue):

  1. Open SmartBlogPost.php in /modules/smartblog/classes
  2. Add a new line between lines 64 and 65 with this code:
    preg_match('/^[\d]+/', $id_post, $id_post);
    $id_post = $id_post[0];
  3. Those lines must be inserted right before line 65 (which starts with $sql = 'SELECT.........)
  4. Save the file
  5. This solution is working with friendly url's so while one probable solution would be to change the setting for friendly url or link rewrite on the module, i could not find any of those options; maybe the module developer will get this fixed in a future release, for now this seems to do the trick.

 

Best of luck!,

Good, 

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 3 months later...
  • 3 months later...
  • 1 month later...
  • 3 months later...

I am using transformer theme ad its blog module, for some reason, all the content I had in it disappeared in the front office. The page is blank, content is still on the dashboard and no 404 is displayed when going to that address. Can someone help? 

Link to comment
Share on other sites

  • 2 weeks later...
  • 7 months later...
  • 3 months later...
  • 2 months later...
  • 3 months later...
On 12/8/2015 at 4:01 PM, Nixnix said:

Here is the solution to this error: https://github.com/smartdatasoft/smartblog/issues/20

 

The variable 'content' is very generic and the Smartblog developer should change it. But until then, this works.

 

thanks, it worked perfectly, the file to edit are the following:

/modules/smartblog/controllers/front/details.php

and 

/themes/themeXXX/modules/smartblog/views/templates/front/posts.tpl

 

Ciao,

Davide

Link to comment
Share on other sites

  • 11 months later...
  • 1 month later...

NOTE: If Nixnix's solution is not work, check the file /controllers/front/category.php. 

The "gods" developers changed the order of the attributes of the "getAllPosts" function, so if the file is still called that function with the order: LANG, LIMIT START, LIMIT is wrong.

If we open the file SmartBlogPost.php and we will see the function, now we see it like this: public static function getAllPost ($limit_start, $limit, $id_lang = null)

Edited by Jose FG (see edit history)
Link to comment
Share on other sites

  • 7 months later...
On 12/3/2014 at 11:48 AM, jellygnite said:

I had this same problem but solved it by NOT using an underscore in the Link Rewrite field.

 

e.g. instead of share_the_love_for_prestashop_1_6

 

try share-the-love-for-prestashop-1-6

 

It solved it for me.

Thank you,

This worked for me. 

Prestashop Ver1.6.1.24

Link to comment
Share on other sites

  • 1 year later...

Hi guys,

PS 1.6.1.24
SB 3.0.5 - latest for P.S 1.6 as developers described

After installing Im getting error as on screen. Anyone knows how to solve it? file smartblog/views/templates/front/postcategory.tpl exist on server.

screen.png

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...