Comments (38)
Idea: Keep an eye on the length of the model while the user is building the Archetype, and alert them somehow (client-side) when they reach 2500. The alert could possibly contain a link to some info about the issue and/or include the raw SQL statement. Maybe we could also include a webservice that makes the change for them? (Not sure if that's smart)
from archetype.
@tomfulton I think it needs to be a conscious decision by the package installer (person doing it). Just not sure what to do. I'm not 100% sure the core will change this anytime soon.
from archetype.
I'd suggest raising a bug on issues.umbraco.org if you haven't already asking to make it "text" or "nvarchar(max)". Not sure why it would be given a limit of 2500.
from archetype.
@mattbrailsford I reported it last April: http://issues.umbraco.org/issue/U4-2120
Could you some votes I suppose :)
from archetype.
We have a dirty workaround for this (because we had to) ... in ApplicationEventHandler.ApplicationStarted
we check if the database table column is nvarchar(2500)
, then ALTER
it to be an ntext
.
It feels like an expensive way to handle it, but we were in a desperate position. // @mattbrailsford
from archetype.
@leekelleher We've flirted with the idea of handling it on install. Not sure if that would be any cleaner.
from archetype.
@kgiszewski - On install sounds like a better event to do it on.
Let us know if you want us to share our code for it.
from archetype.
Please do :)
I think v7 still uses a user control at the end of the package install
process.
On 2/13/14, 8:02 AM, Lee Kelleher wrote:
@kgiszewski https://github.com/kgiszewski - On install sounds like a
better event to do it on.
Let us know if you want us to share our code for it.—
Reply to this email directly or view it on GitHub
#34 (comment).
from archetype.
We can write it as a package-action that runs on install. I wont get chance to look this before next week though.
from archetype.
No worries. I'll merge your other PR in the meantime.
from archetype.
Just a note on this being done on package install. You'll need to check if
UaaS runs package actions when deploying (I'm guessing not) as if it
doesn't, then it means your UaaS instances won't be updated. This was the
reason our implementation does it at app start.
To be honest, I don't see why the app start check is an issue. It checks
whether it needs running before applying the fix, so it's not wasteful. At
worst, it one db hit. At most it's 2 :)
Just my 2 cents
Matt
On Thursday, 13 February 2014, Kevin Giszewski [email protected]
wrote:
No worries. I'll merge your other PR in the meantime.
Reply to this email directly or view it on GitHubhttps://github.com//issues/34#issuecomment-35027982
.
from archetype.
@mattbrailsford Good point (you probably told me this yesterday).
Guess we was trying to remove the need for the app-start check; but yes UaaS would be a major issue (as it wouldn't run the package-action)
from archetype.
Yeah - on install sounds more elegant, but thinking about deployments (non-UAAS), AppStart would seem to be the most reliable way since the package installer will likely never be ran in some environments.
I still feel dirty modifying someone's DB, especially without deliberate consent, but this should be minor and not cause any issues. ...Right?
I wonder if we need to alter the statement at all for MySQL or SQLCE as well. Anyway, your code sounds like a good start if you'd like to share!
from archetype.
Defo works on ce and azure. Dunno bout MySQL. Do people still use that? ;)
On Thursday, 13 February 2014, Tom Fulton [email protected] wrote:
Yeah - on install sounds more elegant, but thinking about deployments
(non-UAAS), AppStart would seem to be the most reliable way since the
package installer will likely never be ran in some environments.I still feel dirty modifying someone's DB, especially without deliberate
consent, but this should be minor and not cause any issues. ...Right? [image:
😬 ]I wonder if we need to alter the statement at all for MySQL or SQLCE as
well. Anyway, your code sounds like a good start if you'd like to share!Reply to this email directly or view it on GitHubhttps://github.com//issues/34#issuecomment-35029756
.
from archetype.
Submitted PR #60
from archetype.
You could always set a config value in the web.config file to say that you've updated the database, that way you can check that first, to avoid the extra DB hit?
from archetype.
Submitted PR #112
from archetype.
OK, so I hit an issue with Courier... seems that there's a 4000 character limit!
I believe this is due to how Courier implements NHibernate, defining the PreValue column as an Nvarchar
- so it throws an exception before attempting to sync the database (regardless of the fact that the db column itself is actually an Ntext
type).
It's difficult to pinpoint the code, (since Courier is closed-source), but this is once-again a show-stopper for me using complex Archetypes with UaaS.
I haven't tried the chunking patch from #113 yet - but it's looking like that's currently the best option.
</rant>
from archetype.
Snap! If you have some time and don't mind testing #113, that might be the reason to go with chunking // @kjac @tomfulton
from archetype.
Sure thing, I'll take a look tomorrow (or over the weekend, depending on workload)
from archetype.
Whoops.... that's messed up. Sorry to hear that, and I'm not gonna say "I told you so". Really, extending the size of the column is the most neat solution, as long as Archetype supports doing so during install (and I can see that the DatabaseSizer project was meant for that).
I will forward merge the master to #113 and have it ready for you for testing asap.
from archetype.
It seems the Archetype config is persisted in the 'value' column with json-formatting. Line-breaks, whitespaces, indentation and all. Removing the formatting would give some extra leverage regarding the 2500 char limit.
from archetype.
Yep, would give a few extra bytes here and there if we stripped all formatting. But it just postpones the inevitable a little bit, I'm afraid... we need a working solution that will allow Archetypes of any size. Hopefully the chunkify solution can work, or even better - perhaps Courier can be brought to play nice with the schema change.
from archetype.
@kjac We're still trying to urge the core team to do a DB migration as a proper fix :)
from archetype.
from archetype.
I meant to chat with you all at CG14 about this. It turns out that the prevalue config for the new Grid feature (in Umbraco 7.2) uses a large-ish JSON structure. I discussed this with Morten and Per at the CG14 Retreat and agreed that the database column should be switched to an Ntext
. No discussion of when this would happen, but the seed has been sown.
from archetype.
Awesome...! :)
from archetype.
w00t!
from archetype.
I saw our Umbraco Issue got assigned to v7.2
from archetype.
Yay... finally!
from archetype.
Hey folks. Just to be completely clear. This fix is required for development with Archetype with pre-v7.2 sites because it's to do with core Umbraco rather than Archetype?
from archetype.
While not required, you'll get an error that the field is too small when your Archetype config (stored as JSON) gets larger than 2500 characters (core limitation). But for most uses of Archetype, you'll hit that limit quickly.
To be clear, v7.2 ups the limit to ntext
which avoids this issue.
If you manually up the limit to avoid the issue (pre-7.2), we can't be sure of how graceful an upgrade will be going from v7.1.x to v7.2.
from archetype.
Hi Kevin,
Thanks for that. I'm already experiencing the problem myself and if it was still the case I was going to share a gist with my solution. I know it's not a particularly difficult solution to fix but if it could save people time.
https://gist.github.com/jamiepollock/8c527fb50fde65ef50e1
If this isn't recommended practice, I can remove the link.
Thanks,
Jamie
from archetype.
Thank you so much. @leekelleher has already included a similar idea in the source code: https://github.com/imulus/Archetype/tree/master/app/Umbraco/DatabaseSizer
The DLL is available on the release page.
from archetype.
Doh, trust me and my skim reading! I'll check it out. Thanks again.
from archetype.
Hi guys we're getting this behaviour.. we're running 7.2
Just wondering if this is the same issue. We're getting an SQL truncated exception
from archetype.
Issue solved on our. @owlyowl please don't post non-Archetype related questions here :)
@kgiszewski this issue should probably be closed as it's been fixed in the core since 7.2?
from archetype.
This is now fixed with 7.2.x :)
from archetype.
Related Issues (20)
- Content picker (and probably media picker) label templates don't work in 7.6 HOT 2
- Fail to convert the value when GetValue<int>() ? HOT 4
- Console Error Relating to Preview Images HOT 5
- Missing Placeholder Translation Text for Icon Filter HOT 8
- Convert DataType Drop Down to Select2 HOT 5
- Allow Complex (e.g., JSON) Default Property Values HOT 4
- ToPublishedContentSet Throws Exception for Orphaned Properties HOT 2
- Support Promises and Injected Services for Label Templates HOT 15
- Automatic Newer Version Checks HOT 9
- Fieldset Labels Don't Sanitize Rich Text Immediately HOT 16
- Custom label template broken HOT 12
- Label Templates Not Fully Resolving in Umbraco 7.4.3 HOT 11
- Upgrade Check Ironically Fails to Run on Upgraded Archetype Installs HOT 2
- Label Template not working after Upgrade to 1.17.1 HOT 12
- Courier bundled in (again) HOT 4
- Archetype has been sunset HOT 16
- Fail to convert the value when GetValue<int>() ? HOT 3
- Label template empty until opening archetype HOT 2
- Automapper excpetion -Archetype.Api.ArchetypeDataTypeController
- Update archetype fieldset model field HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from archetype.