+1-888-365-2779
Try Now
More in this section

Polls Problem

6 posts, 0 answered
  1. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    27 Sep 2010
    Link to this post
    Hi Team,

    I am encountering a weird problem with the Polls module. I have a Sitefinity based website which I converted to a web application project. I have added custom modules and controls and almost done with the website until the client requested to add Polls. I then opened the Polls module to create my first poll and then customize the control templates. I noticed that the poll is not being saved. When I hit "Create" in the Poll properties i get redirected to the PollItemsList with this message still appearing "No Items found". i checked the database and noticed that the polls are being saved in "sf_Polls_PollData" ... I checked the Sitefinity log file but nothing there ...

    I also noticed that when I use the API i can get the list of all the polls that I tried to save ... but still nothing appears in back-end.

    Please advice ...

    Best,

    George
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    27 Sep 2010
    Link to this post
    Hi George ,

    The problem could be in the fact that you have converted the website to web application which is supported in Sitefinity 4.0.

    Could you try to run the following code in a user control ( the same is used for Polls module) and see whether the GridView will be populated

    public PollsQueryFilter FilterQuery
      {
          get
          {
              return (PollsQueryFilter)ViewState["filterQuery"];
          }
          set
          {
              ViewState["filterQuery"] = value;
          }
      }
     
        protected void Page_Load(object sender, EventArgs e)
        {
     
            
                this.dataSource = new ObjectDataSource();
                this.dataSource.TypeName = "Telerik.Polls.PollManager";
                this.dataSource.SelectMethod = "GetPolls";
                this.dataSource.SelectParameters.Add("queryFilter", "");
                this.dataSource.SortParameterName = "sortExp";
                this.dataSource.Selecting += new ObjectDataSourceSelectingEventHandler(dataSource_Selecting);
     
                this.dataSource.ID = "pollsData";
                this.Controls.Add(this.dataSource);
                var Grid = new GridView();
                Grid.DataSourceID = this.dataSource.ID;
                Grid.AutoGenerateColumns = true;
                this.Controls.Add(Grid);
                Grid.DataBind();
         }
     
      private void dataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
      {
          e.InputParameters["queryFilter"] = this.FilterQuery;
      }


    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    27 Sep 2010
    Link to this post
    Hi Ivan,

    Thank you for getting back to me. I have created the custom control and add it to the website. However, while debugging i noticed that the grid's Row count is 0 and the grid doesn't get populated.

    What should I do next?

    Thanks,

    George
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    27 Sep 2010
    Link to this post
    Hello George ,

    If there are records in the database  this is quite strange. Try calling GetPolls method to return an IList and see whether there will be any items. You can follow this article - Get a specific subset of polls filtered by a query.

    It looks like the manager cannot get the items. You can check [sf_Polls_PollData] once again to see whether you have some records there.

    Try resetting SchemaVersion inside  [sf_Polls_Variables]. Set the value to 1. Then restart the application and access the module.

    Let me know the result.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    27 Sep 2010
    Link to this post
    Hi Ivan,

    Here are the results of my tests:

    1- I tried using GetPolls with PollsQuery filter with both using the title option with one of my polls titles and with Active set to true / false ... didn't work
    2- I tried using an empty PollsQuery object ... also didn't work
    3- I tried using the GetAllPolls function which I used before and all the polls were retrieved as expected.
    4- I tried the above after resetting the schema version ... also still doesn't work

    Please let me know if I can provide you with anything that will help you investigate the issue on your machine ... I am thinking about exporting the Polls related tables and sending them over ...

    Best,

    George
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    27 Sep 2010
    Link to this post
    Hello George ,

    You can open a support request and send a sample project ( project  +  database) that I could run locally.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
6 posts, 0 answered