So let's finish the upgrade: fix the problem with the Reference Links. I knew having an extension will one day prove it was a bad decision, and even this simple innocent thing managed to strike back. While on the site surface, things looked fine, the Reference Link extension ceased working rendering those fields impossible to fill up properly. The key is that this simple extension just extended a core feature of Symphony.

First things first: It is not possible to simply disable and uninstall Reference Link from Symphony without also dropping the data connections established by it. I could not tolerate this, so...

First I started looking around in the code of the Reference Link extension to see whether I can add some hack to make it going on with Symphony 2.4. Well, I am not a PHP coder, and I am neither familiar with either web technologies and Symphony itself at it's core, so I rather ditched this idea fast (least to mention how the patch could kick my butt later). However poking around a bit I found that it is actually a very simple extension only extending features of the core Selectbox Link field.

Then why it has an own table? Well, it just adds one column to the stock Selecbox Link structure, specifying the field type. This catched my attention: could it be just hacked out using PHPMyAdmin (or any other mean of working with the database itself)? Well, it could! So here comes, how!

  • Export the xxx_fields_referencelink (xxx being the prefix used when installing Symphony) table in SQL format.
  • Edit the exported file: keep only the INSERT command(s), however remove filling in the field_type column (both from the structure, and the values list). This is not as hard as it may look: this table just defines the field, so it only has a few rows. Change the target of the INSERT to xxx_fields_selectbox_link.
  • Import the modified file, which will populate the xxx_fields_selectbox_link table with the data of the previous reference links.
  • Empty the xxx_fields_referencelink table (however don't drop it since the Reference Link extension is still enabled).
  • In the xxx_fields table, check the type column. Where it reads "referencelink", change to "selectbox_link".

After these are done, logging in to Symphony you should find all your Reference Links converted to Selectbox Links, with the whole site structure left intact. Then you may navigate to the Extensions menu, there you may disable and remove the Reference Link extension without problems.

Of course preferably don't do this directly to the production site if you don't want to accidentally mess up the database. Do it locally on a fresh backup, then when you see it done, export the database, and upload it onto your production site.

Well, hope it helps someone some day! (There may be other abandoned extensions where such a solution might be possible)

External links

Comments

No comments so far. Be the first to comment!

Make a comment

Rules

  1. Please be polite (Leave all your trolls in their respective caves).
  2. If #1 fails, don't feed 'em. They bite.
  3. No links allowed. It won't pass. Neither chains. Use '(dot)' notation.
  4. Spam reeks.
  5. Text is (some day will be) formatted with Markdown.
  6. Your mail address is only visible to me: I understand you also don't like #4.
  7. The mail address you provide is also used to fetch your Gravatar.
  8. Danger! High voltage! Right between your "Post Comment" button and ground.
  9. Still want to comment? Go ahead! :)