Report any technical problems you discover and discuss solutions.

Importing Media in XOTv2

  • SOASBruce
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 2 months ago #106 by SOASBruce
Importing Media in XOTv2 was created by SOASBruce
Hi,

Here at SOAS I've recently installed XOTv2 on a SLES11 LAMP server setup.
I'm getting problems importing media.
For authenticated users (LDAP), the system seems to happily create a workspace and project with what appears to be the correct directory structure under 'USER-FILES' (a named directory containing 'data.xml' and 'preview.xml' files, along with a 'media' directory).
However, when using the 'Edit' button on the 'My Projects' page, and then trying to 'insert' media (I've tried images and videos) to a page, I hit a problem.
It allows me to navigate to a file that I want to upload; tells me "Upload successful"; puts a 'path' in the 'image' box on the edit screen; and even writes that path into the 'data.xml' and 'preview.xml' files. But it doesn't upload the image to the 'media' directory.
I can upload files by clicking on the 'Properties' button on the 'My Projects' page and using the 'Media and quota' tab to 'Import' the files. They are then written to the 'media' directory and display correctly via the 'My Projects' 'Preview' button (or the 'Edit' -> 'Play' buttons).

These are only small(ish) files - less than 1MB.

Does anyone have any ideas what is set incorrectly, or can anyone point me towards the correct bit of code to put some debug messages in?

Cheers,

Bruce

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #107 by JohnSmith
Replied by JohnSmith on topic Importing Media in XOTv2
Hi Bruce,

I added some debug code recently to the upload script xerteonlinetoolkits.googlecode.com/svn/t...te/engine/upload.php

If you download that and place it in /modules/xerte/engine/ and then login to your installation and try to upload a media file from the wizard then a file called error.txt should appear in the same folder.

Let me know what it says.

John

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #108 by JohnSmith
Replied by JohnSmith on topic Importing Media in XOTv2
Backup your upload.php file first !!

Please Log in or Create an account to join the conversation.

  • SOASBruce
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 2 months ago #109 by SOASBruce
Replied by SOASBruce on topic Importing Media in XOTv2
Hi John,

Thanks for that, but ...
it looks as though I'm completely avoiding the upload.php script!
I can't find a 'error.txt' file anywhere after running your version - I even restarted apache.
I also then edited your version of upload.php to add some '_debug("blah ...");' calls right after the 'file_put_contents' calls. Nothing appeared in the /tmp/debug.log file from them either.

Bruce

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #110 by JohnSmith
Replied by JohnSmith on topic Importing Media in XOTv2
Edit a template by selecting it and clicking edit.

Widen the window, right click on the white space and view the source

Do you see a line similar to this (near the bottom):

so.addVariable("upload_path", "upload.php?path=");

What does the second part of yours say?

John

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #111 by JohnSmith
Replied by JohnSmith on topic Importing Media in XOTv2
Oh and what browser/os are you using and have you tried the other major browsers?

Please Log in or Create an account to join the conversation.

Moderators: ronmjultenJohnSmith
Time to create page: 0.147 seconds
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo