Author:
Nils
Version:
2.0.5
Released:
7 February 2010
Category:
Field Types

Closed#1: Causes fatal database error alert in Symphony 2.0.7 when empty

I can only verify that it does this when it’s empty as I have no fields currently populated.

The error shows up as follows:

Column ‘relation_id’ cannot be null An error occurred while attempting to execute the following query INSERT INTO sym_entries_data_78 (entry_id, relation_id) VALUES (‘22’, NULL)

I’ve attached the full log, let me know if you need anything else.

Attachments:
Symphony Fatal Error.pdf

Thanks for the report!

I haven’t had the time to test Mediathek against 2.0.7. Until I finished testing I mark the extension as not compatible with Symphony 2.0.7.

Some questions:

  • Is this (or has this been) a clean install of the extension (version 2.0.3) using Symphony 2.0.6? Or have you been using Mediathek 2 beta on this install at some point?
  • Do you always get this fatal error or does this only happen in certain contexts?
  • Are you able to access your publish area at all?

Doug, can you confirm that the field with an ID of 78 is definitely Mediathek? (You can check this in the sym_fields table.)

@Nils: It was a fresh install of 2.0.6, everything was new. There is always a fatal error on clicking save. I can access the publish area, make changes but when I save it I get the error. New entries aren’t saved but old entries are still updated for some reason. This does not include Mediathek uploads as I haven’t uploaded any images.

@Nickdunn: Confirmed, it’s Mediathek.

I’m not able to reproduce this problem using an up-to-date build of Symphony (2.0.7) upgraded from version 2.0.6. Can you provide me with some more information about the field settings, please?

Could it have something to do with being run locally?

It’s pulling a title, uploaded file and description (for alt text) from an Images section. Both text fields are input fields, not text areas. It’s set to allow multiple entries.

I’ve tried disabling all other extensions that were in use on that page but it didn’t make a difference so I don’t think it’s an incompatibility with Mediathek and some other extension.

I’m going to try transferring the site online (the space isn’t in use right now anyway) and see if it’s an issue with running on a local server.

I haven’t been able to successfully get Symphony 2.0.7 to run, I keep getting errors so I’m going to use 2.0.6 for the client work.

Let me know if there’s any information I can send you from my local installation (which I’ll keep at 2.0.7).

I just did a 100% fresh install of Symphony 2.0.7 and I got the exact same result. Still running locally, I need to figure out a way to run 2.0.7 on my web server.

OK, I’ve been able to load it onto my host and I see the exact same issue there.

Also—and this might be what’s causing the problem—when I do upload an image it does go to the appropriate section but does not get displayed in Mediathek.

I checked this by going through the process of uploading an image and, after it didn’t show up in Mediathek even though it appeared to have upload, I checked the Images section to see that the image was in fact there.

I still can’t reproduce this problem. Would it be possible that you provide me with an ensemble of the site to do some testing?

OK, more testing and here’s the ensemble.

The problem is, now it works fine-ish. I’ve narrowed down the problem to it only happening on the first time you upload am image using Mediathek. Once the field has been used it works perfectly fine.

My guess is this might not be a Mediathek problem but one more for Symphony 2.0.7.

The way I was able to create this was to:

  • Download the GitHub version as well as 2.0.7 from the downloads section.
  • Merge them by moving the extensions and workspace folders from the non-github one over.
  • Add Mediathek to the extensions.
  • Installing as normal (I usually make file permissions 755 instead of 775 but it doesn’t seem to make a difference as I did both to check).
  • Enable the Mediathek extension.
  • Create a new section that contains only a Mediathek field tied to the default image section.
  • Create a new entry in the Mediathek section. This is when I get there error.
  • Click back in the browser.
  • View Mediathek section entries and select the recently created (empty) entry.
  • Choose edit in the Mediathek field and select the recently uploaded image, save.

After this point there are no more errors and I can upload images to my heart’s content. I don’t know if this is something I’d have to do every time I create a section with a Mediathek field or if it’s a one-time deal. That’s my next thing to find out.

Attachments:
symphony-test.zip

Added another section with a second mediathek field (linked to the same image section) and all worked fine.

I then created a new image section and third mediathek test section with just a single mediathek field and also didn’t get an error.

So, my guess is once you’ve uploaded one file everything works just fine from there on.

Hopefully this will help you guys narrow down what’s causing the issue on that first go as that part seems to be rather consistent for me.

Sorry for not answering earlier, but I just forgot to check the issue area of this extensions. I’ll have a look at it but - at first glance - it sounds like and Symphony error which is not properly handled by the Mediathek.

No worries. If there’s any more information you need from me just let me know and I’ll pass it along. I can poke and prod at the local installation as I’m using it purely for testing.

I’ve fixed this here. The same bug was affected the SBL too.

The previous commit also fixes another 2.0.7 bug.

Just added your fixes and released version 2.0.4. Thanks a lot, brendo!

This issue is closed.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details