New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating Symphony #1618
Comments
PS: By the way, it's quite irritating that Symphony defaults to |
@allen or @rowan-lewis, why did we default to
This is definitely possible. Since Symphony 2.2.x we changed the DSE/EE so that the resulting file is saved with the version of Symphony that generated the file. Logic can be added that either updates these files during migration, or displays an Alert in the backend. From memory there are a couple of times where there have been changes to Datasources:
Because there is a number of things to consider, I think they should be in the update files, not in the actual core logic (we should be trying to strip the legacy code out, not add to it). This will be a little hard to do, as Symphony 2.3 only officially supports updating from a 2.2.x site. Some of these old changes could be added to the
Anymore information on this? I can't recall anything specifically that may of affected these in particular. |
We shouldn't update automatically. Due to the interaction of Data Sources with fields, too many things that the core is not aware of might need to be adjusted. We should just properly flag outdated Data Sources and maybe link to an external guide that highlights the most obvious changes needed. I'm not sure if this is possible, but it would be great if fields could also add special flags. Think of the improved filter logic of the date field: if the core provided the field with the information that an 2.0 Data Source is used in Symphony 2.3, the field could add information to the backend, e. g. by adding system messages or additional texts in the filtering interface.
Not really. No related errors in the logs. Just disappearing data in the interface:
|
By the way, there is another issue with older Data Sources:
It's this line:
|
One problem with this is that we don't know that it's a 2.0 Datasource. Prior to the Symphony version being saved all Datasources were saved with a version of 1.
Odd, would you be able to put this in a private gist and DM or email me them for debugging?
This is not possible to correct without modifying the datasource file on update, it's a PHP warning because the Data Source signatures have changed, not a Symphony error as such. |
Did you encounter #1605 by any chance? |
Okay, to correct my comment above: this is something we can and should correct on update in my eyes. But we should still flag the Data Source as outdated.
It would still be a good start to provide the information that the Data Source is from an old version. So Symphony 2.3 should be able to say |
With regards to which issue? |
To be more precise regarding the updating: We should adjust the specific functions (I think removing the |
I just sent you two Data Sources, a static and a dynamic one. |
We have started doing this since about 2.2 IIRC, so we can determine in future.
Your password field not being updated to 150 characters to store your mitigated password using the new logic.
Thanks, I found something about Static DataSources in the commit history |
The update log contained no errors. |
Actually, I don't understand what's happening in that commit. Is it logical that no content is displayed? I cannot resave the Data Source without copy and pasting the original static XML and although the file is updated when I do so, the editor still displays nothing. It's heavily escaping my input. This … <teilnehmen-monate>
<monat handle="januar" nummer="01">Januar</monat>
<monat handle="februar" nummer="02">Februar</monat>
<monat handle="maerz" nummer="03">März</monat>
<monat handle="april" nummer="04">April</monat>
<monat handle="mai" nummer="05">Mai</monat>
<monat handle="juni" nummer="06">Juni</monat>
<monat handle="juli" nummer="07">Juli</monat>
<monat handle="august" nummer="08">August</monat>
<monat handle="september" nummer="09">September</monat>
<monat handle="oktober" nummer="10">Oktober</monat>
<monat handle="november" nummer="11">November</monat>
<monat handle="dezember" nummer="12">Dezember</monat>
</teilnehmen-monate> … becomes this: public $dsParamSTATIC = '<teilnehmen-monate>
<monat handle=\\\"januar\\\" nummer=\\\"01\\\">Januar</monat>
<monat handle=\\\"februar\\\" nummer=\\\"02\\\">Februar</monat>
<monat handle=\\\"maerz\\\" nummer=\\\"03\\\">März</monat>
<monat handle=\\\"april\\\" nummer=\\\"04\\\">April</monat>
<monat handle=\\\"mai\\\" nummer=\\\"05\\\">Mai</monat>
<monat handle=\\\"juni\\\" nummer=\\\"06\\\">Juni</monat>
<monat handle=\\\"juli\\\" nummer=\\\"07\\\">Juli</monat>
<monat handle=\\\"august\\\" nummer=\\\"08\\\">August</monat>
<monat handle=\\\"september\\\" nummer=\\\"09\\\">September</monat>
<monat handle=\\\"oktober\\\" nummer=\\\"10\\\">Oktober</monat>
<monat handle=\\\"november\\\" nummer=\\\"11\\\">November</monat>
<monat handle=\\\"dezember\\\" nummer=\\\"12\\\">Dezember</monat>
</teilnehmen-monate>'; |
I just fixed that and restored some broken functionality for handling Symphony 2.2, 2.2.2 - 2.2.5 and then 2.3+ static DS's. |
And just pushed another commit. There was bad regression in the |
Great, static and dynamic Data Sources work perfectly again. Thanks! |
How's that copy for detecting an old style parameter? Currently I'm searching the parameter output, required param setting and the filters for anything that starts with |
Yes, old parameters will not contains dots: it's always |
The reason was that unformatted data wrapped in CDATA is safer to output. Given that there is no text formatter chosen, we cannot assume that the source data would be valid or well-formed XML. |
I know this is certainly not the most common task, but I recently had to update an install from Symphony 2.0.6 to the latest version. Following @brendo's advice, I updated step by step: from 2.0 to 2.1 to 2.2 to 2.3. I ran (and am still running) into some problems. Most of them are related to extensions that don't update properly (especially changed database columns are an issue) but I have some issues with the core as well.
First and foremost, Data Sources are a problem:
formatted
andunformatted
pseudo elements. Given an input fieldtext
the old Data Sources will reference this field astext
and not astext:formatted
ortext:unformatted
. Nevertheless, Symphony 2.3 still recognise the field and treats it as an unformatted value, wrapping it in<![CDATA[]]>
(strangely also adding a<p />
element if the content contains HTML, e. g.<![CDATA[<p><p>original paragraph 1.</p><p>original paragraph 2.</p></p>]]>
). The problems begin when you edit a Data Source: the field will not be selected in the interface because the UI is only aware oftext:formatted
andtext:unformatted
and not oftext
. As soon as you save your Data Source, your field is removed. I was quite irritated because this broke my frontend and I didn't understand why. If Symphony treatstext
astext:unformatted
on the frontend, it should also select this field value in the DS editor.text
to$ds-my-datasource.text
although$ds-my-datasource
is still available in the XML for compatibility reasons. In my eyes, Symphony should flag this problem in a system message when loading an old Data Source with a single value (not an array as in Symphony 2.3) so that the developer knows that he has to adjust his templates in order to keep them future proof.There are also some issues with changed filtering syntax that you don't recognise immediately (the date field has been improved quite a bit and other fields as well). The user is not aware that this might be a problem – and that's a problem.
Symphony doesn't highlight old Data Source files in the backend at all so you are not aware at all that you need to take special care here. In contrary, Symphony behaves as if it silently updated everything in the background – which is not true as you see above. Old Data Sources should be flagged somehow, maybe in a special column in the index view and as a system message in the DS editor.
There also seem to be some problems with events that I haven't managed to debug yet. I'm not sure if something changed in the execution order of Data Sources and events – at least I'm seeing some strange behaviours (I have to deal with a custom shopping cart that has gone mad after upgrading).
The text was updated successfully, but these errors were encountered: