• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Just upgraded to CGBlog 1.9.1 - images in the detail gone
PostPosted: Mon Apr 30, 2012 7:25 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Feb 08, 2007 6:11 pm
Posts: 481
Location: Florida
I use CGSmartImage to manipulate images.

In the CGBlog on the summary page, the images are there as they are supposed to be. Before I upgraded, the images were on the detail view of the blog entry too. After I upgraded, they are gone.

Using ALL latest versions of everything, core and modules.


Top
 Profile  
 
 Post subject: Re: Just upgraded to CGBlog 1.9.1 - images in the detail gon
PostPosted: Mon Apr 30, 2012 9:29 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 6585
Location: Fernie British Columbia, Canada
Just tested this... works fine:

Code:
<img src="{$entry->file_location}/{$entry->fieldsbyname.testimage->value}" alt="{$entry->fieldsbyname.testimage->value}"/>


Though there is a bug with the custom url handling that will result in my releasing a 1.9.2 before long.

_________________
Follow me on twitter
--
if you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
----------------
Don't make me angry..... you won't like me when I'm angry....


Top
 Profile  
 
 Post subject: Re: Just upgraded to CGBlog 1.9.1 - images in the detail gon
PostPosted: Tue May 01, 2012 12:19 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Feb 08, 2007 6:11 pm
Posts: 481
Location: Florida
Code:
{if $entry->post_image}<figure class="postimg_tall">
<a class="group" href="{CGSmartImage src1=$entry->file_location src2=$entry->post_image  filter_resize=w,700 notag=1 noembed=1 quality=70}">
<div>full image</div><img src="{CGSmartImage src1=$entry->file_location src2=$entry->post_image  filter_resize=w,300 notag=1 noembed=1 quality=70}" alt=''/></a>
{if $entry->post_image_caption}<figcaption>{$entry->post_image_caption}</figcaption>{/if}
</figure>{/if}



This code used to work and it works in the summary template. I don't know what to do to fix this.


Top
 Profile  
 
 Post subject: Re: Just upgraded to CGBlog 1.9.1 - images in the detail gon
PostPosted: Tue May 01, 2012 7:40 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 5083
Location: The Netherlands
Some time ago the name of the custom fields were changed from
Code:
$entry->some_name
to
Code:
$entry->fieldsbyname.some_name->value
Hope this helps,

Rolf

_________________
Dutch CMSMS community website cmsms.nl and Wiki wiki.cmsms.nl
--------------------------
My CMSMS Tips and Tricks Weblog and website about Pneumatic Tube Systems / Rohrpost
My other (Dutch) website: Smakelijk eten zonder zout (Design: Compufairy)


Top
 Profile  
 
 Post subject: Re: Just upgraded to CGBlog 1.9.1 - images in the detail gon
PostPosted: Tue May 01, 2012 4:11 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Feb 08, 2007 6:11 pm
Posts: 481
Location: Florida
Nothing works. Not even that. I have a simple, non image field named "authorname"

I tried all three of these:

Code:
{if $entry->authorname}
Posted by: {$entry->fieldsbyname.authorname->value} {$CGBlog->Lang('middot')}
{/if}

{if $entry->fieldsbyname.authorname->value}
Posted by: {$entry->fieldsbyname.authorname->value} {$CGBlog->Lang('middot')}
{/if}

{if $entry->fieldsbyname.authorname}
Posted by: {$entry->fieldsbyname.authorname->value} {$CGBlog->Lang('middot')}
{/if}



Nothing works. No custom fields show up on the detail page. On the summary page it works. This code:

Code:
{if $entry->authorname}
Posted by: {$entry->authorname} {$CGBlog->Lang('middot')}
{/if}


... worked until I upgraded to CGBlog 1.9.1


Top
 Profile  
 
 Post subject: Re: Just upgraded to CGBlog 1.9.1 - images in the detail gon
PostPosted: Tue May 01, 2012 4:35 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Feb 08, 2007 6:11 pm
Posts: 481
Location: Florida
realized that author might conflict, but changing it to "authorname" doesn't work either.

How come this works? When I have to do the fieldsbyname.name (which hasn't worked yet but it's not in any documentation I could find so far).

Code:
{if $entry->extra}
   <div id="CGBlogPostDetailExtra">
      {$extra_label} {$entry->extra}
   </div>
{/if}


Top
 Profile  
 
 Post subject: Re: Just upgraded to CGBlog 1.9.1 - images in the detail gon
PostPosted: Tue May 01, 2012 5:02 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Feb 08, 2007 6:11 pm
Posts: 481
Location: Florida
Luckily I backed up right before this upgrade, so I have just set the site back to the previous versions of the modules below. I usually don't BU before module updates, but since 1.10 has been quite an evil process, a little voice told me to do this.

I'm wondering why, since I've never been told to call fields by "fieldsbyname" except for listit (I think) then why would the summary work and not the detail page?

Now I think of all the sites where the customers are going to be screwed if they upgrade their blog or other modules where the call to extra fields are being used the old (and shorter more elegant way). Don't you think that calling fields, even if they can use "fieldsbyname" that the old should also work to be compatible with upgrading?

CGBlog 1.9.1 1.8.3
CGExtensions 1.28.2 1.28.1


Top
 Profile  
 
 Post subject: Re: Just upgraded to CGBlog 1.9.1 - images in the detail gon
PostPosted: Tue Jul 31, 2012 8:43 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Fri Nov 30, 2007 9:15 am
Posts: 329
Hi All,

I'm also having issues with a site i recently updated where the "Field definitions" failed to show up on the CGBlog detail page.

After looking at the issue it seems to me the contents of the field definitions are stuck in a "private" Array when trying to call them from the detail template...

Summary template {$entry->fieldsbyname|@debug_print_var} output:
Code:
Array (1)
testerr => stdClass Object (4)
   ->value = "testerr-CONTENT"
   ->id = "1"
   ->name = "testerr"
   ->type = "textarea"
Summary template {$entry->fieldsbyname|var_dump} output:
Code:
object(stdClass)#134 (4) { ["value"]=> string(15) "testerr-CONTENT" ["id"]=> string(1) "1" ["name"]=> string(7) "testerr" ["type"]=> string(8) "textarea" } Array
Detail template {$entry->fieldsbyname|@debug_print_var}
Code:
Array (1)
testerr => cgblog_field Object (0)
Detail template {$entry->fieldsbyname|var_dump} output: (here you can see the "_data:private")!
Code:
object(cgblog_field)#133 (1) { ["_data:private"]=> array(4) { ["value"]=> string(15) "testerr-CONTENT" ["id"]=> string(1) "1" ["name"]=> string(7) "testerr" ["type"]=> string(8) "textarea" } } Array
Greetings,
Manuel

_________________
Do you like your open source cms? Buy from the CMSMS partners || Donate
(or at least share some knowledge :D >> See some of my stuff )


Last edited by manuel on Wed Aug 01, 2012 10:21 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Just upgraded to CGBlog 1.9.1 - images in the detail gon
PostPosted: Tue Jul 31, 2012 8:49 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Feb 08, 2007 6:11 pm
Posts: 481
Location: Florida
I got this to work ONLY after I changed the template:

Code:
{assign var='capsnspaces' value='Field Name with Caps and Spaces'}
{if $entry->fieldsbyname.$capsnspaces != ''}
{$entry->fieldsbyname.$capsnspaces->value}{/if}


figuring this out courtesy of Calguy


Top
 Profile  
 
 Post subject: Re: Just upgraded to CGBlog 1.9.1 - images in the detail gon
PostPosted: Tue Jul 31, 2012 9:28 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Fri Nov 30, 2007 9:15 am
Posts: 329
Hi Carasmo,

Thx for the quick reply!

Please correct me if i'm wrong
I was wrong ;D

Greetings,
Manuel

_________________
Do you like your open source cms? Buy from the CMSMS partners || Donate
(or at least share some knowledge :D >> See some of my stuff )


Last edited by manuel on Wed Aug 01, 2012 10:25 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Just upgraded to CGBlog 1.9.1 - images in the detail gon
PostPosted: Tue Jul 31, 2012 9:34 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Feb 08, 2007 6:11 pm
Posts: 481
Location: Florida
probably, I just took what Robert gave me.


Top
 Profile  
 
 Post subject: Re: Just upgraded to CGBlog 1.9.1 - images in the detail gon
PostPosted: Wed Aug 01, 2012 10:18 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Fri Nov 30, 2007 9:15 am
Posts: 329
Hi Carasmo,

I must have been a bit cross-eyed while trying to fix this issue!!!
After a good night sleep and taking an other look, I'm having a hard time understanding how i could have interpreted the code so very very wrong!!
The code you replied me with stores the field name in a var and calls it using $entry->fieldsbyname.$capsnspaces...
This way, you can even use spaces in your field name...
So if you want to use a Field Name containing spaces, the code below is indeed the correct way to go!

Quote:
Code:
{assign var='capsnspaces' value='Field Name with Caps and Spaces'}
{if $entry->fieldsbyname.$capsnspaces != ''}
{$entry->fieldsbyname.$capsnspaces->value}{/if}

For me the solution was to just take in to account that if you want to call a field definition by using "fieldsbyname" it has apparently became case sensitive. (i could have easily avoided this problem, i know)
Code:
{$entry->fieldsbyname.comment->value}
Changed to:
Code:
{$entry->fieldsbyname.Comment->value}

Greetings,
Manuel

_________________
Do you like your open source cms? Buy from the CMSMS partners || Donate
(or at least share some knowledge :D >> See some of my stuff )


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting