rasmniel

@wmk & @Firesphere Thanks for the brilliant tips. You make my job easier 😄😘

(2)
rasmniel

Like, would it be sensible to use two different branches on the same repository and merge any changes from one into the other to save work? And in that case, which would be more optimal to work on first; SS3 or SS4? I can't quite figure out which one translates best into the other 🤔

rasmniel

Does anyone have experience maintaining two identical code bases; one for SS3 and one for SS4, without having to do all the work twice and avoiding overwriting changes incorrectly?

  • Same repo?
  • Branching?
  • Merging changes?
  • Pitfalls? Any tips and tricks are appreciated 😄👍
wmk

good question... namespacing in SS4 makes it pretty difficult

rasmniel

That's my thought and sorta the main problem I will be facing, since no third party libraries are required.

rasmniel

I'm worried maintaining namespaces will end up in errors

wmk

For http://hallstatt.net I thought about some kind of feature freeze during the update process; or split out stuff that might change to already namespaced, non-dataobject classes

wmk

but if you need the same code base for different projects, it might become difficult. most modules for SS3 are somewhat "as-is" and won't get any updates, new features are SS4 only.

rasmniel

Hmm, interesting 🤔 Is there a benefit to not namespacing models in SS4? Conversely, would it make sense to namespace everything except models for SS3?

rasmniel

I'm not too worried about updates to modules, as the project won't be using any.

wmk

you can already start using e.g. "Image::class" for relations in SS3, it just returns "Image" in this case.

wmk

well, namespacing and PSR-4 is about getting your classes sorted (and in a namespace). IMHO that's a great feature to capsulate your classes away.

wmk

I once had an issue in a project with blog module that an not-namespaced PDF library had a class called "Tag"... fortunately the new beta release of that lib was namespaced.

rasmniel

I can imagine the pain... I will definitely namespace everything, Happily, I only have a two moderately sized models, so maybe it won't be so bad...

rasmniel

How about exposition of frontend dependencies, such as those exposed through vendor-expose. Can that approach be used in SS3?

Firesphere

Use git ignore refs, to prevent commits being attributed to the wrong person

Firesphere

Add namespaces as a commit, use ignore-refs, so you won't get lost in all the stupid "refactor" refs

Firesphere

I'd say, start an ss4 branch, to which you'll commit your progress

Firesphere

Then, when working and approved, you can merge it in to master

Firesphere

Do use the same repo, and tag your last SS3 commit with a version

rasmniel

But I will need to maintain the SS3 branch with new features as well, though 🤔

wmk

might I suggest a good set of unit tests then ?

Firesphere

That discussion is not up to the client my friend 🙂

😆 (1)
rasmniel

New regulations coming up means that the old code base need to update as well. We have several websites that need to follow standards 😉

Firesphere

If you say "Feature freeze or no upgrade", they have to pick one 😉

Firesphere

Your client can't demand new features, unless they are willing to pay for them to be implemented twice

Firesphere

Which, in my opinion, is something you can highlight 🙂

wmk

It sounds like a module they use for multiple websites. And e-commerce new regulations with payment providers are a pain

rasmniel

It's a GDPR thing... And we have over 100 websites running SS3, which will obviously be paying for the update, but that doesn't solve my issue. I have to update SS3 and SS4 in parallel 🤷‍♂️

Firesphere

If you need some explanation as to why keeping two branches fully active, here's my personal favourite: > So, think you have a car. And you want a new car. > You've bought a new car, say, a Tesla 3 > But in the mean time, you have your old car. Of course. > You can't simply demand that every time you change something to your old car, it also gets applied to your new car. > That will cost you, because your old car is a Ford and not a Tesla, and vice versa. > You can't expect both to be maintained at the same pace, without paying for both cars

Firesphere

I am well aware it's really hard to get this through to clients, but you have to make that cut, otherwise, you'll be stuck

Firesphere

You'll either be stuck with an outdated website, or be stuck applying new features all the time, giving you no chance to finish the upgrade

wmk

well, for the GDPR module, I'd namespace as much as possible in SS3 and break out the actual logic in seperate classes that can be used in both, SS3 and 4. Then you should only make business logic updates to the shared classes. And have a good set of tests to make sure it works in SS3 and 4

Firesphere

"But how can Microsoft do it?" They have a lot more resources, but also, they didn't. Win7 is still a thing. And people are still using it. It's not secure, but they don't seem to care, or pay for it to be fixed You can't have your cake, and eat it too

Firesphere

Of course, there are cases that can be more easily handled 🙂 I totally agree with that @wmk 🙂

Firesphere

What I'm trying to say is, you can't upgrade your car, without leaving your old car behind. And that's a thing, that's a problem for a lot of clients. In my experience, clients do not understand that easily

rasmniel

I get your point, but as this is a matter of maintaining or turning down customer support. I can say with absolutely certainty that at least half of our customers are not gonna pay for a SS4 upgrade. They'd rather find another provider, and that's sadly not viable for us.

Firesphere

So you'll have to make that clear. Stop adding features and let us upgrade, or add features and don't upgrade

Firesphere

I understand that PoV. But, I doubt that's actually going to happen.

Firesphere

You should not try to convince your clients to stay.

Firesphere

Moving vendor is not a 50% case, unless the client is already unhappy with you

Firesphere

Upgrading Win7 to Win10 in a corporate environment, costs time and effort.

Firesphere

Why is it, that a website apparently has to be free?

Firesphere

And more common than not, clients come back, because they realise their misstake

rasmniel

We're definitely gonna punk clients who want the upgrade, or they will be left without regulation compliant websites at their own risk and expense, but we want to be able to offer it to all of our customers regardless 🙂 I think I have enough to go on to start working on a solution. Thanks for your help, guys. It's really appreciated 😄👍

Firesphere

"We can maintain your website in its current state. Or we upgrade. Upgrading is not free, because it involves effort from our teams. We can support you and help you, getting an even better website, but we can't take new features during the process, unless absolutely business critical"

Firesphere

Note, that "business critical" often means a singular page that's more often than not, only live for a few months. You can scrap those from your upgrade path anyway 😉

Firesphere

I'm also not trying to say "just dump the clients" or "just let them sink", but help them

Firesphere

It may be hard for a sales person to understand the effort that goes in to upgrading. Make sure they understand 🙂

Firesphere

An important thing to note, is that it is a major version upgrade, not a minor It helps to make those involved understand SemVer 🙂


Show less replies
rasmniel

I did override the getTypes() function already, and I actually read that documentation too, I just wanted to not override the template if possible, but seems like there is no other way. Thanks for sharing, though 😄

rasmniel

Alright, I guess that will have to do. Thanks 🙂👍

rasmniel

Hey folks! I've got a problem with search using Solr, that causes numerics to break the search. According to this article: https://stackoverflow.com/questions/20884338/solr-cant-search-for-numbers-mixed-with-characters it has to do with the splitOnNumerics="0" attribute on the WordDelimiterFilterFactory. When hardcoding in the module http://types.ss template, it works, but I have no clue how to update that value through the code without overriding the http://types.ss template. Any Solr pundits know if this is possible without overriding the template? A config setting or a module update?

Show 2 attachment(s)
Stack Overflow  
Solr: Can't search for numbers mixed with characters

I have some items in my index (Solr. 4.4), which contain names like Foobar 135g, where the 135g refers to some weights. Searching for foobar or foobar 135 does work, but when I try to search for the

Stack Overflow  
Solr: Can't search for numbers mixed with characters

I have some items in my index (Solr. 4.4), which contain names like Foobar 135g, where the 135g refers to some weights. Searching for foobar or foobar 135 does work, but when I try to search for the

Hide attachment content
rasmniel

Hey everyone! Do you know the solution to fully deleting a file programmatically with the File data object? I'm left with "File cannot be found" tiles for deleted files, suggesting that the file itself was deleted but the data object remains without a file asset. CMS 4.4.2

rasmniel

It appears you must explicitly unlink the Element from the ElementalArea relation, or it will keep displaying the Element in the CMS as if it were never archived. It disappears from the frontend, but nothing in the CMS indicates that the Element is in fact archived.