Sitecore 7.5 upgrade - sitecore

I am upgrading Sitecore 7.2 to Sitecore 7.5 .
Everything went good, but when I have to convert data for analytics I see many errors passing. First I did it without WFFM parameters, which worked perfectly.
Then a restored my original database and executed the same command with the WFFM parameters.
Now is see hundreds of erros passing in my conversion tool:
Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Sitecore.Forms.ConversionTool
at Sitecore.Forms.ConversionTool.ConversionPipeline.<Process>b__2(VisitsRow v)
at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
at Sitecore.Forms.ConversionTool.ConversionPipeline.Process(VisitExtensionArgs args)
at ...
Anyone who has an idea what is causing this error?

I had the same error and raised a support issue with Sitecore. Their answer was that the documentation in the xDB Upgrade and Conversion Guide is wrong with regards to the data reader type.
The documentation says:
/wffmreadertype "Sitecore.Forms.ConversionTool.Reader.SqlServerReader, Sitecore.Forms.ConversionTool"
It should be:
/wffmreadertype Sitecore.Forms.ConversionTool.Reader.SqlServerReader

Related

ActiveModel::MissingAttributeError (can't write unknown attribute `price_cents`): error after rails upgrading to rail 5.1

I have upgraded my rails app which was earlier on rails 4.1 to rails 5.1.
Now I am getting an error while using acts_as_shopping_cart gem, which is on version 0.4.1
I tried many things but not sure why exactly I am getting this error, while adding item to cart
ActiveModel::MissingAttributeError (can't write unknown attribute price_cents):
app/models/shopping_cart.rb:11:in add
app/controllers/shopping_carts_controller.rb:38:in add_to_cart
Any suggestions on this, will be appreciated. Thanks in advance
this one is still not yet supported for Rails 5 https://github.com/crowdint/acts_as_shopping_cart, you could try this one https://github.com/dabit/acts_as_shopping_cart
Late reply, but I was banging my head on this one for too long so I thought this may help other people.
You're getting the MissingAttributeError because your shopping_carts table doesn't have a price_cents field. The previous version of acts_as_shopping_cart (~ 0.2.2) was setup to use a float field called price, and it did not use the money-rails gem. The newer versions (>= 0.4.0) use money-rails and an integer field called price_cents, then money-rails "automagically" creates a attribute called "price" that converts to/from the price_cents field.
You may be able to migrate your price field using one of their helpers:
https://github.com/RubyMoney/money-rails#migration-helpers

Can't save models to DynamoDB using Swift 4

I started a new project using XCode9 and Swift4. I copied the basic example code for saving models to DynamoDB but I keep getting the following error:
Amazon DynamoDB Save Error: Error Domain=com.amazonaws.AWSCognitoIdentityErrorDomain Code=0 "(null)" UserInfo={__type=com.amazon.coral.validate#ValidationException, message=Supplied AttributeValue is empty, must contain exactly one of the supported datatypes}
My project only contains the example code provided and nothing else, how can I get my models to save?
The work-around until Swift 4 is supported properly is to put
#objcMembers
before the class declaration for your model class, as described in this bug report.
https://github.com/aws/aws-sdk-ios/issues/750
This fixed the issue for me without having to downgrade to Swift 3.
DynamoDB doesn't seem to support Swift4 yet. I downloaded the sample project provided by AWS (MySampleApp) and set the target's build settings Swift Language Version to Swift 4.0, made slight modifications so it would compile, and I got the same error.
Reducing the Swift Language Version to Swift 3.2 in both the sample app and my own project fixed the problem.

I am migrating my sitecore from sitecore 6.5 to 8.1

I am migrating a website using Sitecore 6.5 to sitecore 8.1
Below is the code written in sitecore 6.5, I need to change to sitecore 8.1 version.
when I used sitecore.analytics 8.1 version, it is showing error.
can some help in getting the issue resolved for the below code
public static int GetPageVisits(ID pageId)
{
return DataAdapterManager.Provider.Sql.ReadOne<int>(CommandText, ReadPageViews, new object[] { "currentItemId", pageId.ToString() });
}
below is the error I am getting...
Error 1 'Sitecore.Analytics.DataAccess.DataAdapterProvider' does not
contain a definition for 'Sql' and no extension method 'Sql' accepting
a first argument of type
'Sitecore.Analytics.DataAccess.DataAdapterProvider' could be found
(are you missing a using directive or an assembly reference?)
Sitecore Analytics API changed in xDB, From your code i can see you are trying to get page visits number, For that you can use the following API
VisitStatistics PageStats = Sitecore.Analytics.Testing.TestManager.GetPageStatistics(Guid, DateTime, DateTime)
Guid parameter is the item ID, the 2 DateTime parameters are for the interval time range you want to get the page statistics for.

Sitecore: Seemingly Random errors appear

we are experiencing some very odd errors in our installation.
Some times out of nowhere Sitecore throws an error:
Assert: Value Cannot be null. Parameter: Item.
The closest i have come to identifying the problem is narrowing it down to either an index or the web database.
Anyway, if I log into sitecore the Item is just missing, i can fix it in 3 ways:
Rebuild the index.
Recycle app pool
iisreset
Does any of you have an idea why this might be happening? We are running Sitecore.NET 6.5.0 (rev. 120706). Any help will be deeply appreciated.
You are describing a system stability issue, so I recommend opening a ticket with Sitecore support (http://support.sitecore.net). This sort of issue is difficult to troubleshoot over Stack Overflow, since we do not have access to your logs and configuration.
When opening the ticket, I recommend using the Support Package Generator which bundles up all the information (Web.config, App_Config files, IIS settings, Sitecore log files) that Sitecore Support needs to troubleshoot the issue. It's a pretty nifty tool.
That said, from what you describe, it sounds like the issue is related to caching. The fact that restarting IIS resolves the issue indicates that the item is in the Web database, but the runtime doesn't see it. You can prove out whether this is the issue by clearing cache using the /sitecore/admin/cache.aspx screen. If your cache is not getting updated properly, you should review your configuration against the guidelines in the SDN Scaling Guide.
Based on knowing you're using the Advanced Database Crawler, your issue may be how you're converting a SkinnyItem to an Item. I've had this issue before. If you look at the SkinnyItem.cs class, there's a GetItem() method to convert it into an Item. You can see it uses the database to get the item by its ID, language, and version number. Its possible that when you publish from master to web, you are publishing a new version # of an existing item and thus the new version exists in the web DB, but the index is not updated and references the old version. So, this GetItem() call would use the previous version # and the item would be null. One way to fix this is instead of calling that GetItem() method, just use your own code to get the latest version of that item from Sitecore, e.g.
Item item = Sitecore.Context.Database.GetItem(someSkinnyItem.ItemID);
Instead of
Item item = someSkinnyItem.GetItem();
Here's an example flow:
Foo item created in master DB as version 1.
Publish Foo to web
Index will pick up version 1 in web DB and put in index.
Any querying code against index will convert the SkinnyItem to an Item via that GetItem() method and will pass 1 as the version #.
Page will load, no error in log
Back in master, create version 2 of Foo and publish.
Index may not get updated right away or even if configured wrong.
Code that looks against index will call GetItem() and still call with version 1 since that's in the index
But when you published, web no longer has version 1, it now has version 2, and thus that specific version of that item Foo is null
Error shows in log
On a similar note, here's a blog post by Alex Shyba (creator of the ADC) on how to sync HTML cache clearing with the index updates. That may help.

Django debug-toolbar wildly inaccurate summary results

I am using django debug-toolbar on django 1.4. The problem is, it gives me incorrect summary results.
For example, on a landing page which produces one query (check to see if the user is logged in). DT says that there are 43 queries taking 17.27ms. However, when I actually click the SQL queries tab, it does show the correct result -- 1 query in 0.47ms.
Is DT incompatible with 1.4 or something, or is there a way to fix this?
It looks like this was a known issue according to github. I recently had exactly the same problem.
https://github.com/django-debug-toolbar/django-debug-toolbar/issues/88
I managed to resolve the issue by simply updating the django-toolbar to the latest version.