Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ella  
#1 Posted : Thursday, May 2, 2013 8:55:21 AM(UTC)
ella
Rank: Advanced Member

Groups: Registered, contributor
Joined: 6/30/2011(UTC)
Posts: 288
Woman
Russian Federation

Thanks: 59 times
Was thanked: 42 time(s) in 36 post(s)
I try to use sorting in DataRule (want to sort article list). But it doesn't work for any fields - I try to use title field, UUID, even CreationDate sorting doesn't work...
I tried to re-create view and datarule, nothing helps...

(Database XML, Kooboo 4.0.2, release 29/03/2013)
KooBoo fan
ella  
#2 Posted : Friday, May 3, 2013 5:48:20 AM(UTC)
ella
Rank: Advanced Member

Groups: Registered, contributor
Joined: 6/30/2011(UTC)
Posts: 288
Woman
Russian Federation

Thanks: 59 times
Was thanked: 42 time(s) in 36 post(s)
I did some experiments.
If I set "Top" or "Enable paging" options, sorting works.
But if these options are empty, sorting doesn't sort.
KooBoo fan
ella  
#3 Posted : Tuesday, May 7, 2013 5:54:40 AM(UTC)
ella
Rank: Advanced Member

Groups: Registered, contributor
Joined: 6/30/2011(UTC)
Posts: 288
Woman
Russian Federation

Thanks: 59 times
Was thanked: 42 time(s) in 36 post(s)
Is it only my bug?
KooBoo fan
jifeng  
#4 Posted : Tuesday, May 7, 2013 9:13:07 AM(UTC)
jifeng
Rank: Administration

Groups: Administrators, Registered
Joined: 9/3/2009(UTC)
Posts: 2,156
Man
Location: Xiamen China

Thanks: 43 times
Was thanked: 284 time(s) in 253 post(s)
Thanks, it was fixed in the dev repository host on github: https://github.com/Kooboo/CMS
Regards,

Jifeng Huang

Kooboo Team
thanks 1 user thanked jifeng for this useful post.
ella on 5/7/2013(UTC)
hanoivatoi_1985  
#5 Posted : Sunday, May 19, 2013 3:45:01 AM(UTC)
hanoivatoi_1985
Rank: Advanced Member

Groups: Registered, contributor
Joined: 3/19/2011(UTC)
Posts: 219
Location: Mercedes C200

Thanks: 31 times
Was thanked: 9 time(s) in 8 post(s)
Quote:
I try to use sorting in DataRule (want to sort article list). But it doesn't work for any fields - I try to use title field, UUID, even CreationDate sorting doesn't work...
I tried to re-create view and datarule, nothing helps...


I have the same error on the latest version KooBoo (XML DB, SQL DB, KooBoo 4.1.0.0514 15/8/2013, CMS-master.zip, Kooboo_CMS.zip)?

KooBoo 18/4/2003 (kooboo-053e7d703d99.zip) no problems on.


Code:
@(Page_Context.Current.GetFieldValue("Title")??MenuHelper.Current().ContentTitle)


Bug: Kooboo.CMS.Sites.View.Page_Context' does not contain a definition for 'GetFieldValue' and no extension method 'GetFieldValue' accepting a first argument of type 'Kooboo.CMS.Sites.View.Page_Context' could be found (are you missing a using directive or an assembly reference?)

Edited by user Sunday, May 19, 2013 10:05:46 AM(UTC)  | Reason: Not specified

jifeng  
#6 Posted : Monday, May 20, 2013 1:49:19 AM(UTC)
jifeng
Rank: Administration

Groups: Administrators, Registered
Joined: 9/3/2009(UTC)
Posts: 2,156
Man
Location: Xiamen China

Thanks: 43 times
Was thanked: 284 time(s) in 253 post(s)
Hi hanoivatoi_1985,

They are different issues, the "GetFieldValue" method was removed(Refacted), the new method was protected.

Code:

 protected virtual string EvaluateStringFormulas(string formula)
        {
            var valueProvider = new PageSettingValueProvider(this);
            return this._formulaParser.Populate(formula, valueProvider);
        }


You have to use ViewData.Title directly for now.
Regards,

Jifeng Huang

Kooboo Team
hanoivatoi_1985  
#7 Posted : Tuesday, May 21, 2013 8:31:30 AM(UTC)
hanoivatoi_1985
Rank: Advanced Member

Groups: Registered, contributor
Joined: 3/19/2011(UTC)
Posts: 219
Location: Mercedes C200

Thanks: 31 times
Was thanked: 9 time(s) in 8 post(s)
hi jifeng,

I tested with kooboo 4.1.0.0514 15/8/2013 not fix error: DataRule sorting does not work ?

UserPostedImage

UserPostedImage

Quote:
You have to use ViewData.Title directly for now.


I don't understand how to use ViewData.Title ?

Edited by user Wednesday, May 22, 2013 5:42:53 AM(UTC)  | Reason: Not specified

jifeng  
#8 Posted : Thursday, May 23, 2013 4:04:59 AM(UTC)
jifeng
Rank: Administration

Groups: Administrators, Registered
Joined: 9/3/2009(UTC)
Posts: 2,156
Man
Location: Xiamen China

Thanks: 43 times
Was thanked: 284 time(s) in 253 post(s)
yes, the issue still exists. Has been fixed in https://github.com/Koobo...aa5ef67b2c6c285b5d3e63cf

Edited by user Thursday, May 23, 2013 4:54:32 AM(UTC)  | Reason: Not specified

Regards,

Jifeng Huang

Kooboo Team
xueshaoyu  
#9 Posted : Sunday, June 16, 2013 1:18:34 PM(UTC)
xueshaoyu
Rank: Member

Groups: Registered
Joined: 4/28/2013(UTC)
Posts: 18
Location: xuesaoyu

Originally Posted by: hanoivatoi_1985 Go to Quoted Post
Quote:
I try to use sorting in DataRule (want to sort article list). But it doesn't work for any fields - I try to use title field, UUID, even CreationDate sorting doesn't work...
I tried to re-create view and datarule, nothing helps...


I have the same error on the latest version KooBoo (XML DB, SQL DB, KooBoo 4.1.0.0514 15/8/2013, CMS-master.zip, Kooboo_CMS.zip)?

KooBoo 18/4/2003 (kooboo-053e7d703d99.zip) no problems on.


Code:
@(Page_Context.Current.GetFieldValue("Title")??MenuHelper.Current().ContentTitle)


Bug: Kooboo.CMS.Sites.View.Page_Context' does not contain a definition for 'GetFieldValue' and no extension method 'GetFieldValue' accepting a first argument of type 'Kooboo.CMS.Sites.View.Page_Context' could be found (are you missing a using directive or an assembly reference?)

我也遇到这个问题。
我是在使用站点导航功能的时候爆的这个错误。
<div>
<ul class="breadcrumb">
@foreach (var item in MenuHelper.Breadcrumb())
{
<li>@Html.FrontHtml().PageLink(item.LinkText, item.FullName)</li>
<li class="separator">|</li>
}
<li>@(Page_Context.Current.GetFieldValue("Title")??MenuHelper.Current().Name)</li>
</ul>
</div>

我查看了源代码。没有GetFieldValue这个方法,并且你提供的那个方法是受保护的不能调用。
使用viewdata.Title报错:找不到title
jifeng  
#10 Posted : Monday, June 17, 2013 1:34:15 AM(UTC)
jifeng
Rank: Administration

Groups: Administrators, Registered
Joined: 9/3/2009(UTC)
Posts: 2,156
Man
Location: Xiamen China

Thanks: 43 times
Was thanked: 284 time(s) in 253 post(s)
哦,难怪你们会用到GetFieldValue这个方法啊,原来是在Code helper中有提供啊。晕,

这个方法在Kooboo CMS 4.0中被重构了,尽量不要使用这个方法了。
Regards,

Jifeng Huang

Kooboo Team
jifeng  
#11 Posted : Monday, June 17, 2013 1:52:15 AM(UTC)
jifeng
Rank: Administration

Groups: Administrators, Registered
Joined: 9/3/2009(UTC)
Posts: 2,156
Man
Location: Xiamen China

Thanks: 43 times
Was thanked: 284 time(s) in 253 post(s)
Originally Posted by: jifeng Go to Quoted Post
Hi hanoivatoi_1985,

They are different issues, the "GetFieldValue" method was removed(Refacted), the new method was protected.

Code:

 protected virtual string EvaluateStringFormulas(string formula)
        {
            var valueProvider = new PageSettingValueProvider(this);
            return this._formulaParser.Populate(formula, valueProvider);
        }


You have to use ViewData.Title directly for now.



Please use "@(Page_Context.Current.ContentTitle??MenuHelper.Current().Name)" instead of "@(Page_Context.Current.GetFieldValue("Title")??MenuHelper.Current().ContentTitle)"
Regards,

Jifeng Huang

Kooboo Team
jifeng  
#12 Posted : Monday, June 17, 2013 2:09:10 AM(UTC)
jifeng
Rank: Administration

Groups: Administrators, Registered
Joined: 9/3/2009(UTC)
Posts: 2,156
Man
Location: Xiamen China

Thanks: 43 times
Was thanked: 284 time(s) in 253 post(s)
Regards,

Jifeng Huang

Kooboo Team
jifeng  
#13 Posted : Monday, June 17, 2013 2:09:16 AM(UTC)
jifeng
Rank: Administration

Groups: Administrators, Registered
Joined: 9/3/2009(UTC)
Posts: 2,156
Man
Location: Xiamen China

Thanks: 43 times
Was thanked: 284 time(s) in 253 post(s)
Regards,

Jifeng Huang

Kooboo Team
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.