Search

I just realized that I didn't install the latest release. So you might be right, the typo is perhaps already fixed. :-)

When I upload images with Mediathik the file goes from "image.jpg" to "image.jpg.jpeg", is there a reason for this? Also, more importantly, is there anything I can do about it?

Mediathek uses an iframe for uploads so you upload files through the normal interface. As far as I understand your problem this issue is not related to the Mediathek but to the upload field. What happens if you upload files directly to your image section?

Nevermind. I don't know why but it's stopped doing it now. Use error, I guess. I'll post again if I experience it for a second time but as it stands I can't recreate the problem even with the same process.

OK, given my recent record this is likely my issue somewhere, but when I go and add images via a Mediathek field they are uploaded successfully but are not automatically added.

Here's the workflow I need to go through to make them show: 1. Create a new article. 2. Fill out all fields and add images via a Mediathek field. 3. Save the article. 4. Reselect the images that were uploaded via the Mediathek field. 5. Save the article.

Is there something I'm doing wrong that might make this happen? For myself it's not a big deal but with clients using this CMS it might be an issue, especially with the less techno-savvy ones.

dougoftheabaci, saving issue got fixed few days ago. Try to download latest version from github.

Version 1.1.3 is on GitHub. Changes are:

Version 1.1.3 - 13th March 2009

 - [fixed]   fetch correct id after creating new entry
 - [fixed]   invisible preview link

Mediathek wouldn't recognise upload fields other than the official "Upload" field type. I modified field.mediathek.php (line 71) to also support the Hashed Upload Field:

if($f->get('id') != $this->get('id') && ($f->get('type') == 'upload' || $f->get('type') == 'hashedupload')) $fields[] = array($f->get('id'), ($this->get('related_field_id') == $f->get('id')), $f->get('label'));

OK. I'm having trouble with this. My Mediathek looks nothing like the one posted on post #36.

I've attached two screenshots, one for Safari 4 on Mac. The other Firefox 3 on Mac. Safari is not styled and shows the proper label... doesn't show preview, search, show all. Firefox doesn't show the label but shows the filename and is not styled, and it also doesn't show preview, search, show all.

Can anyone help me?

It seems as if the JavaScript isn't applied at all. Could you please have a look at the source code and see if the following assets have be added to the page head and if the links are pointing to existing destinations on your server:

  • /extensions/mediathek/assets/mediathek.js
  • /extensions/mediathek/assets/mediathek.css

I found the problem. For some reason, any plugin that uses jQuery throws off the Mediathek plugin.

Has anyone else experienced this problem? I'm having difficulty seeing why jQuery based extensions wouldn't play nice with mooTools driven Mediathek extension.

Can anyone help me???

OK. I got it to work. I had to tweak the field.mediathek.php file. Forgive me off the bat, I'm a novice with PHP, and don't have a good handle on Object Oriented programming. If I'm using the incorrect nomenclature please correct me.

I changed the order parameter (the last number in the addScriptToHead method) and added a couple of zeroes to each one like so... (this code starts around line 210)

if(empty($ext_mootools) && $_GET['mediathek'] != 'true' && $_POST['mediathek'] != 'true') {
                $this->_engine->Page->addScriptToHead(URL .     '/extensions/mediathek/lib/mootools-1.2.1-core.js', 10000);
                $ext_mootools = '121'; // save mootools version number
            }
            if(empty($ext_mootools_drag) && $_GET['mediathek'] != 'true' && $_POST['mediathek'] != 'true') {
                $this->_engine->Page->addScriptToHead(URL . '/extensions/mediathek/lib/mootools-1.2-drag.js', 10005);
                $ext_mootools_drag = '120'; // save mootools version number
            }
            if(empty($ext_quicksilver) && $_GET['mediathek'] != 'true' && $_POST['mediathek'] != 'true') {
                $this->_engine->Page->addScriptToHead(URL . '/extensions/mediathek/lib/quicksilver.js', 11000);
                $ext_quicksilver = '100'; // save mootools version number
            }
            if(empty($ext_mediathek) && $_GET['mediathek'] != 'true' && $_POST['mediathek'] != 'true') {
                $this->_engine->Page->addScriptToHead(URL . '/extensions/mediathek/assets/mediathek.js', 11500);
                $this->_engine->Page->addStylesheetToHead(URL . '/extensions/mediathek/assets/mediathek.css', 'screen', 12000);
                $ext_mediathek = '110'; // save mediathek version number
            }

What this does is forces the Mediathek mootools javascript and css to be called last. This needs to be done so it doesn't conflict with any jQuery extensions. Per jQuery documentation, when using jQuery with other javascript libraries (like mootools), if you include jQuery BEFORE other libraries, you may use "jQuery" when you do some work with jQuery, and the "$" is also the shortcut for the other library. There is no need for overriding the $-function by calling "jQuery.noConflict()".

Two questions:

  • How does the data source sorting work?

  • Would it be possible to have an option telling Mediathek what fields to include in the XML result? I have a both a Title and a Description attached to my images, and it would be nice if I hadn't to add a second DS just to get the Description.

How does the data source sorting work?

Sorting should always be alphabetically using the title field. But there seems to be an inconsistency in this context. There have been requests for manual sorting but I have not yet found a good way to integrate this - the UI gets quite complicated when adding the option.

Would it be possible to have an option telling Mediathek what fields to include in the XML result? I have a both a Title and a Description attached to my images, and it would be nice if I hadn't to add a second DS just to get the Description.

I think this is a good idea and I have been thinking about it earlier. But again I'm not sure yet how to implement this feature. Where should you be able to define the needed fields? In the data source editor or in the section and field overview?

I'm very busy at work at the moment - if someone has ideas how this all might work well as UI, please post mockups or fork the repository.

By the way - I've seen that Scott ported the admin.js to jQuery lately. Mediathek is using Mootools and I'm not sure whether it's better to also move this to jQuery or not. If there are any feature request, feel free to post these here, as I will take them into account for my library decision.

Part of me thinks it would be best to port it to jQuery if only to minimize the number of libraries being used in Symphony and to limit the possibility of compatibility issues.

As for features, one I would find quite handy is the ability to have more than just the image's title and a link to preview that image shown once an image has been uploaded. This could be managed by a "show [x] field" check box when you add the Mediathek field to a section.

To give you an idea why I'm asking for this feature the reason is I'm in the early stages of another redesign of my website where the project pages will feature a main image and then images of specific features I wish to highlight. Since the number of featured objects would change for each design I am looking at Mediathek. It will allow me to add as many features as I need but for my own purposes it'd be nice if I could show the title, the body text and the image preview all at once.

So that's also the ability to toggle between link to the preview image and actually showing it by default.

The MooTools/JQuery conflict my be resolved here. I think involves jQuery extensions activating .noConflict() mode.

This will involve jQuery-using extensions adding :

     var J = jQuery.noConflict();

Then replace their '$(' with 'J('. I've tested this with the Calendar Overlay Extension + Mediathek and they both appear to be working.

I have a vague recollection that the problem stems from the fact that MooTools uses the global namespace, which means that every other library needs to get out of its way. WTG Mootools.

Has anyone had any issues using this with 2.0.2? I’ve followed the instructions on installing it, but when I try to associate (as per the example) an image with an article, it merely results in an incorrect sql statement, and won’t attach the image to the article.

14:13:48 > WARNING: 512 - MySQL Error (1054): Unknown column 't2.value' in 'field list' in query "SELECT t1.`entry_id`, t1.`file`, t2.`value` 
                FROM  `sym_entries_data_68` AS t1 
                INNER JOIN  `sym_entries_data_68` AS t2 
                WHERE t1.`entry_id` = t2.`entry_id` 

It tries to query the same table for some reason, and I’m new to symphony so I’m not really familiar enough with it to trace it.

This seems to be connected with tag filtering. Two questions:

  1. What’s the setup of your Mediathek field? Are you filtering by tags?
  2. What’s the setup of the Mediathek section (the one your media is in)? Which fields are you using?

Thanks for the reply!

First, I’ve tried this using the default workspace and without it, neither worked on OSX nor a FreeBSD system, just out of curiousity.

What’s the setup of your Mediathek field? Are you filtering by tags?

The mediathek field has a label called “images”, I chose to not filter by tags, or check the other two options. The column isn’t shown.

What’s the setup of the Mediathek section (the one your media is in)? Which fields are you using?

The media section has a default file upload field called “image”, and I chose to upload it to workspace/upload (upload is 777) with no validation.

After doing this, that’s where the error above showed up. After adding a tags field for the media section, using “existing values” for the suggestion list and no validation rule, I get the following:

14:05:36 > WARNING: 2 - implode() [function.implode]: Invalid arguments passed in file /symphony-2/extensions/mediathek/fields/field.mediathek.php on line 278
14:05:36 > WARNING: 512 - MySQL Error (1054): Unknown column 't2.value' in 'field list' in query "SELECT t1.`entry_id`, t1.`file`, t2.`value` 
                    FROM  `sym_entries_data_1` AS t1 
                    INNER JOIN  `sym_entries_data_1` AS t2 INNER JOIN  `sym_entries_data_4` AS t3 WHERE t1.`entry_id` = t2.`entry_id` AND t1.`entry_id` = t3.`entry_id` AND (t3.`value` IN ('Hello') ) 
                    LIMIT 0 , 300" 

The result of course being, my images don’t show up when I try to create a new gallery in the mediathek box.

Also, when I try to upload a file I also get the following error:

14:12:15 > WARNING: 512 - Unable to remove file - /symphony-2/workspace/upload/ in file /symphony-2/symphony/lib/toolkit/class.general.php on line 520

Create an account or sign in to comment.

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