Hi,
Running U7.2.5, I've installed uShare 7.2.0 and hit some issues. When I clicked on the uShare tab on the homepage, I was told to enable the media, which I had done. After some searching I found firstly the error log was saying it couldn't find a stored proc so I followed the thread: https://our.umbraco.org/projects/website-utilities/ushare/suggestions/55272-umbraco-7-Support and created the stored proc. That has fixed that error but now I get another error.
As the project states, uShare was last tested up to Umbraco 7.2.4. If you look at that Stored Procedure, you'll see it refers to the cmsDataType table. My guess is that this table might not be available in Umbraco 7.2.5 anymore, but will have to check this out. This might also be the reason the original installation failed. I'll get to this asap but in the mean time, perhaps if you look at your database and can spot what the table name should be, feel free to changed the Stored Procedure and see if it fixes it.
I've tested an installation of uShare on a clean install of Umbraco 7.2.5 (and 7.2.8) and all seems good, so I couldn't reproduce the error unfortunately. I checked the 7.2.5 database and the cmsDataType table still exists, so I'm not sure what your SQL error refers to?
Any news on whether you've got that table on your installation?
On a successful uShare installation, you'll see the following tables added:
uShareAuthorizations
uShareServiceProviders.
You'll also see the following stored procedures added:
Hi,
Im still having issues and I don't have any of the stored procs in my database.
I've tried to uninstall the package to put a fresh install on but even though it says the uninstall was successful, I still see a uShare tab on my content page in the backend.
What's the best way to manually uninstall uShare and clear our the database so that I can give the install another bash.
I think that should do it. It should've already removed those on uninstallation, but perhaps didn't remove the dashboard section for some reason (config/Dashboard.config)
Hi,
Still having some strange issues. Installed it fresh and non of the stored procs have been created. Looking at the package.xml file, if I copy all the SQL queries (line 46 to 251) and (259 to 300) and run them on my SQL database, is that everything that needs setting up on the database side?
I've not seen before that the package setup doesn't run those lines if it's using Sql Server, so not sure why that is. Now that you've run those lines and reinstalled the package, has that solved the original issue?
Getting there!
I ran the SQL queries and found one issue,
ALTER TABLE [dbo].[uShareAuthorizations] WITH CHECK ADD CONSTRAINT [FK_uShareAuthorizations_umbracoUser] FOREIGN KEY([UmbracoUserId])
REFERENCES [dbo].[umbracoUser] ([id])
GO
My umbracoUser table doesn't have a prefix of dbo.
Will this cause an issue with the overall package?
I now have the "Publish to Facebook" message on individual pages but my uShare tab is still blank which means I can't authorize the website against facebook or twitter.
If you can remove the [dbo] and run this snippet again and the remaining snippets that might not have run as a result of this, that should hopefully complete all the DB changes. However, not running the above snippet should not break the plugin, it just won't have the constraint. But be sure that the rest of the script after this has been executed.
So by the sounds of it, you've created a uShare datatype and added it as a property to your document type. The uShare tab will display the authorisation options only for those social media providers (e.g. Facebook) you've selected in your uShare datatypes. Again, it sounds like you've at least selected Facebook here, which should show the Facebook authorisation/deauthorisation options on the uShare tab. To populate the uShare tab, it uses the uShareDoesHaveDatatypeWithServiceProviderEnabled stored procedure.
Can you therefore:
1) Check that this stored procedure has been added
2) Select the "Enable Facebook" option in your uShare datatype and execute the stored procedure manually as the plugin would do in order to show the Facebook options on the uShare tab. The following script executes the stored procedure and should return "1" and not "0":
DECLARE @return_value int
EXEC @return_value = [dbo].[uShareDoesHaveDatatypeWithServiceProviderEnabled]
@ServiceProviderName = N'Facebook',
@uSharePropertyEditorAlias = N'Governor.uShare'
GO
Still having issues but going away for the weekend.
Think I might uninstall the package, edit the XML in the package file so that it doesn't error due to the dbo. name and then try a final reinstall.
Really appreciate all the help you've been giving, hopefully it will work this time!
Hi,
I've spent some time working on this and have finally got the package to install successfully on my installation.
I replaced all [dbo] prefixes with my own which I use in my database and it installed without a problem.
I have now authorized with Twitter but when I click "share" I get an error: "Twitter authorization unavailable: Please ensure to authorize"
Have I missed something?
I've authorized the site with Twitter via the Dashboard.
That will happen if it can't retrieve the Twitter authorisation tokens stored in the Umbraco DB. These should be created when authorising your Twitter app via the uShare tab as you've mentioned above.
Once authorised, can you please check the uShareAuthorizations table to see if it's got your Twitter tokens stored (the Twitter entry should be the one with ServiceProvidedId = 3). If not, then something went wrong with the actual app authorisation or writing the authorisation tokens to the DB.
Else, if it's got your 2 Twitter access tokens, please manually run the uShareGetUserAccessTokens stored procedure, which is the one the Umbraco package will call to retrieve your tokens from the DB when clicking the "share" button. Assuming your Umbraco user ID = 0, it should be as follows:
This should return a single entry with your Twitter authorisation tokens which the app requires to post to Twitter on your behalf. If this returns no result, but you know the data is there, perhaps the issue is with this script.
Might also be worth checking the stored procedures to remove [dbo] if you haven't already done so.
Just to add something else that I have found - when trying to authorize facebook, they have changed their developers page and it looks like they have got rid of publish_stream, which was part of the documentation and so I currently can't authorise to facebook.
Great to hear it's finally working! It seems after all that, it might have just been the [dbo] issue :)
Yes, you're right, the Facebook publishstream has been replaced by publishactions. This code change has only been released in the uShare 7.2.0 package (that you're using) - I've not checked the Facebook documentation in a while but can you have a look if they've got a publish_actions permission available to specify? Hopefully this would do the trick.
They don't seem to have publishactions anymore, they do have managepages and the only publish I can find is publish_pages. I've selected that option but I don't think that is the correct.
Facebook have also changed the screens for configuring things so I may have missed something.
Right, it might be that publish_actions is the right one, however the uShare code also needs to be updated to reflect that. This is configured in Governor.Umbraco.uShare.OAuth2.AuthClients.FacebookAuthClient
If you want to, you can give this a go by grabbing the source from CodePlex, or else I'll have to look into testing it again against the latest Facebook API to ensure it's still compatible, time permitting.
Am I missing something? Had a look on CodePlex and can only see two txt files, no source code seems to be online. I can download the compiled versions but obviously that isn't going to work.
Been trying to build the solution today after making the changes but getting a number of errors that I haven't had a chance to troubleshoot. Could be my environment more than anything.
Been working on this today and finally got the package to build and install.
Reading about publishstream, it has been replaced with publishactions, which you have within the FacebookAuthClient.cs so I just removed all calls to publish_stream, this hasn't fixed the issue.
When I click authorize I get a facebook popup with the following error:
Invalid Scopes: publish_stream. This message is only shown to developers. Users of your app will ignore these permissions if present. Please read the documentation for valid permissions at: https://developers.facebook.com/docs/facebook-login/permissions
It sounds strange that it's still complaining about publish_stream if it's been removed from your package. I'm still planning to have another look as well but just unfortunately have not managed to do so yet :(
It was from another link someone else posted that led me to the solution.
I downloaded another fresh copy of the source code, replaced the publishstream with publishactions in Governor.Umbraco.uShare.UI (uShareFacebook.aspx.cs) and removed publish_stream from Governor.Umbraco.uShare OAuth2 -> AuthClients -> FacebookAuthClient.cs
Invalid object name 'cmsDataType'
Hi, Running U7.2.5, I've installed uShare 7.2.0 and hit some issues. When I clicked on the uShare tab on the homepage, I was told to enable the media, which I had done. After some searching I found firstly the error log was saying it couldn't find a stored proc so I followed the thread: https://our.umbraco.org/projects/website-utilities/ushare/suggestions/55272-umbraco-7-Support and created the stored proc. That has fixed that error but now I get another error.
How do I fix this problem?
Hi Owain
As the project states, uShare was last tested up to Umbraco 7.2.4. If you look at that Stored Procedure, you'll see it refers to the cmsDataType table. My guess is that this table might not be available in Umbraco 7.2.5 anymore, but will have to check this out. This might also be the reason the original installation failed. I'll get to this asap but in the mean time, perhaps if you look at your database and can spot what the table name should be, feel free to changed the Stored Procedure and see if it fixes it.
Rigardt
Hi, Sorry, totally missed the fact that I was trying to install it on a newer version of Umbraco!
Will have a dig around and if I find a solution, I'll post here.
O.
Hi Owain
I've tested an installation of uShare on a clean install of Umbraco 7.2.5 (and 7.2.8) and all seems good, so I couldn't reproduce the error unfortunately. I checked the 7.2.5 database and the cmsDataType table still exists, so I'm not sure what your SQL error refers to?
Any news on whether you've got that table on your installation?
On a successful uShare installation, you'll see the following tables added:
uShareAuthorizations
uShareServiceProviders.
You'll also see the following stored procedures added:
uShareDeleteUserAccessTokens
uShareDoesHaveDatatypeWithServiceProviderEnabled
uShareGetUserAccessTokens
uShareSaveUserAccessTokens
You'll also have a uShare folder in App_Plugins
Can you confirm that you've got all these?
Rigardt
Hi, Im still having issues and I don't have any of the stored procs in my database. I've tried to uninstall the package to put a fresh install on but even though it says the uninstall was successful, I still see a uShare tab on my content page in the backend.
What's the best way to manually uninstall uShare and clear our the database so that I can give the install another bash.
Cheers, O.
To manually remove:
Delete your document type uShare properties
Delete your uShare datatype
Delete config/uShare.config
Delete config/Dashboard.config > uShare section
Delete App_Plugins/uShare
Delete the above DB objects
Delete bin/Governor.Umbraco.uShare.dll
I think that should do it. It should've already removed those on uninstallation, but perhaps didn't remove the dashboard section for some reason (config/Dashboard.config)
Let me know how it goes.
Hi, Still having some strange issues. Installed it fresh and non of the stored procs have been created. Looking at the package.xml file, if I copy all the SQL queries (line 46 to 251) and (259 to 300) and run them on my SQL database, is that everything that needs setting up on the database side?
Hi Owain
Yes, those are all the DB changes.
Can you confirm that you're using Sql Server?
Rigardt
Using SQL Server 2014 express.
Hi Owain
I've not seen before that the package setup doesn't run those lines if it's using Sql Server, so not sure why that is. Now that you've run those lines and reinstalled the package, has that solved the original issue?
Rigardt
Getting there! I ran the SQL queries and found one issue,
My umbracoUser table doesn't have a prefix of dbo.
Will this cause an issue with the overall package?
I now have the "Publish to Facebook" message on individual pages but my uShare tab is still blank which means I can't authorize the website against facebook or twitter.
Hi Owain
If you can remove the [dbo] and run this snippet again and the remaining snippets that might not have run as a result of this, that should hopefully complete all the DB changes. However, not running the above snippet should not break the plugin, it just won't have the constraint. But be sure that the rest of the script after this has been executed.
So by the sounds of it, you've created a uShare datatype and added it as a property to your document type. The uShare tab will display the authorisation options only for those social media providers (e.g. Facebook) you've selected in your uShare datatypes. Again, it sounds like you've at least selected Facebook here, which should show the Facebook authorisation/deauthorisation options on the uShare tab. To populate the uShare tab, it uses the uShareDoesHaveDatatypeWithServiceProviderEnabled stored procedure.
Can you therefore:
1) Check that this stored procedure has been added
2) Select the "Enable Facebook" option in your uShare datatype and execute the stored procedure manually as the plugin would do in order to show the Facebook options on the uShare tab. The following script executes the stored procedure and should return "1" and not "0":
Still having issues but going away for the weekend. Think I might uninstall the package, edit the XML in the package file so that it doesn't error due to the dbo. name and then try a final reinstall.
Really appreciate all the help you've been giving, hopefully it will work this time!
Hi, I've spent some time working on this and have finally got the package to install successfully on my installation. I replaced all [dbo] prefixes with my own which I use in my database and it installed without a problem.
I have now authorized with Twitter but when I click "share" I get an error: "Twitter authorization unavailable: Please ensure to authorize"
Have I missed something?
I've authorized the site with Twitter via the Dashboard.
Cheers,
Hi Owain
That will happen if it can't retrieve the Twitter authorisation tokens stored in the Umbraco DB. These should be created when authorising your Twitter app via the uShare tab as you've mentioned above.
Once authorised, can you please check the uShareAuthorizations table to see if it's got your Twitter tokens stored (the Twitter entry should be the one with ServiceProvidedId = 3). If not, then something went wrong with the actual app authorisation or writing the authorisation tokens to the DB.
Else, if it's got your 2 Twitter access tokens, please manually run the uShareGetUserAccessTokens stored procedure, which is the one the Umbraco package will call to retrieve your tokens from the DB when clicking the "share" button. Assuming your Umbraco user ID = 0, it should be as follows:
This should return a single entry with your Twitter authorisation tokens which the app requires to post to Twitter on your behalf. If this returns no result, but you know the data is there, perhaps the issue is with this script.
Might also be worth checking the stored procedures to remove [dbo] if you haven't already done so.
Let me know if this helps at all.
Regards, Rigardt
Thanks for all your help! Now have it working!! Finally!
I found the codeplex documentation and spotted I had the callback URL wrong so it wasn't executing the aspx page to insert in to the DB.
Just to add something else that I have found - when trying to authorize facebook, they have changed their developers page and it looks like they have got rid of publish_stream, which was part of the documentation and so I currently can't authorise to facebook.
Great to hear it's finally working! It seems after all that, it might have just been the [dbo] issue :)
Yes, you're right, the Facebook publishstream has been replaced by publishactions. This code change has only been released in the uShare 7.2.0 package (that you're using) - I've not checked the Facebook documentation in a while but can you have a look if they've got a publish_actions permission available to specify? Hopefully this would do the trick.
They don't seem to have publishactions anymore, they do have managepages and the only publish I can find is publish_pages. I've selected that option but I don't think that is the correct.
Facebook have also changed the screens for configuring things so I may have missed something.
Right, it might be that publish_actions is the right one, however the uShare code also needs to be updated to reflect that. This is configured in Governor.Umbraco.uShare.OAuth2.AuthClients.FacebookAuthClient
If you want to, you can give this a go by grabbing the source from CodePlex, or else I'll have to look into testing it again against the latest Facebook API to ensure it's still compatible, time permitting.
I'm happy to give it a go and if I get it to work I will let you know. Probably won't be today but might get a chance tomorrow.
If I also get time, I'm happy to update my documentation and share it with you for the facebook pages if that would be helpful.
Great, thanks! To build the Umbraco package, run Governor.Umbraco.uShare\BuildPackage\BuildPackage.cmd and use the ZIP. Let me know how it goes...
Am I missing something? Had a look on CodePlex and can only see two txt files, no source code seems to be online. I can download the compiled versions but obviously that isn't going to work.
https://ushare.codeplex.com/SourceControl/latest#readme.txt
Cheers,
Hi Owain
You might be looking at the master branch, which only has those text files in. Can you see the branches dropdown - if so, please use 7.2.0.
Yea, because with several Umbraco releases it requires a new package version, I decided not to use master in the conventional way here...
Rig
Yip, I can see that now - thanks. I'll download it and see what I can do :) There are just now enough hours in a day!
Not forgotten about this - just not had time yet to dig around and give it a go. Hopefully get some time next week. :)
Been trying to build the solution today after making the changes but getting a number of errors that I haven't had a chance to troubleshoot. Could be my environment more than anything.
Been working on this today and finally got the package to build and install.
Reading about publishstream, it has been replaced with publishactions, which you have within the FacebookAuthClient.cs so I just removed all calls to publish_stream, this hasn't fixed the issue.
When I click authorize I get a facebook popup with the following error:
Hi Owain
It sounds strange that it's still complaining about publish_stream if it's been removed from your package. I'm still planning to have another look as well but just unfortunately have not managed to do so yet :(
hi! Got it to work! :)
It was from another link someone else posted that led me to the solution.
I downloaded another fresh copy of the source code, replaced the publishstream with publishactions in Governor.Umbraco.uShare.UI (uShareFacebook.aspx.cs) and removed publish_stream from Governor.Umbraco.uShare OAuth2 -> AuthClients -> FacebookAuthClient.cs
Brilliant! :)
is working on a reply...