10 Posts
beato
4 years ago
8
Topic

Hi everybody, 

I'm trying to setup the seblod download plugin but always run into an error when clicking on the download link. 
I'm using Joomla 3.9.14 / Seblod 3.18 / plg_cck_field_link_download_1.5.0 / PHP 7.1

I run into troubles and setup a very basic form including a group x field for attaching one ore more files. Saving data and showing the article in the frontend works fine. The displayed link in the browser seems to be ok. But clicking on the download link does not work. 

=> "1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as value, c.id as type_id, a.store_id FROM #__cck_core AS a LEFT JOIN AS b o' at line 1 


I already tried to change the template, using a minimal .htaccess but never succeeded. 

If I change the "Link" type from "Download" to none the path/file is showed correctly.

Is it a problem to use the file download link plugin in a group x?

Thanks for any help and hints

Form: Content (same fields in "Admin Form")

Group x fields: content but same fields in "Admin Form")

Single article view with link view in browser.

Clicking on the download links leads to this display:

Get a VIP membership
10 Posts
beato
4 years ago
0
Level 1

I'm trying to figure out what causes the error. Therefore I turned on the debug mode and get the following:

#FunctionLocation
1()JROOT/libraries/joomla/database/driver/mysqli.php:665
2JDatabaseDriverMysqli->execute()JROOT/libraries/joomla/database/driver.php:1662
3JDatabaseDriver->loadObject()JROOT/libraries/cms/cck/database.php:85
4JCckDatabase::loadObject()JROOT/libraries/cms/cck/dev/helper.php:244
5JCckDevHelper::getDownloadInfo()JROOT/components/com_cck/controller.php:194
6CCKController->download()JROOT/libraries/src/MVC/Controller/BaseController.php:710
7Joomla\CMS\MVC\Controller\BaseController->execute()JROOT/components/com_cck/cck.php:16
8require_once()JROOT/libraries/src/Component/ComponentHelper.php:402
9Joomla\CMS\Component\ComponentHelper::executeComponent()JROOT/libraries/src/Component/ComponentHelper.php:377
10Joomla\CMS\Component\ComponentHelper::renderComponent()JROOT/libraries/src/Application/SiteApplication.php:194
11Joomla\CMS\Application\SiteApplication->dispatch()JROOT/libraries/src/Application/SiteApplication.php:233
12Joomla\CMS\Application\SiteApplication->doExecute()JROOT/libraries/src/Application/CMSApplication.php:196
13Joomla\CMS\Application\CMSApplication->execute()JROOT/index.php:49

Does this output help someone to point me in the direction of the error source?

By the way: I exported the app-folder and installed it on an XAMPP server and got the same behaviour an error output.

1283 Posts
Bucklash
4 years ago
0
Level 1

What are the groupx settings?

what is the groupx content type?

what are the fields in groupx content type?


questions like that :)

10 Posts
beato
4 years ago
0
Level 1

Hi Bucklash,

Thank you for taking care of this topic. In order to solve the problem I made the application simple. I hope I've chosen the screenshots in a way that these answer your questions.
First screenshot shows setup for the group x field in the content view. "Link" and "Typography" under "2" are set to "none". The other two fields just with standard settings too.

Following screenshot shows the content of the group x and the setup of the file field. Again all settings left to standard except "Typography" for the file field (see screenshot in my first post). The download settings are "Content  -Current-" / Field name and Class: ... (means empty) / Menu Item and Title: -None-

Thanks and best regards from Switzerland

1283 Posts
Bucklash
4 years ago
0
Level 1

Hi

First, I am no groupx guru, so can’t help that much ... but... your groupx field should not be introtext.

Make it a custom name ie filegoupx or whatever

1283 Posts
Bucklash
4 years ago
0
Level 1

      Follow this tutorial:

      https://www.seblod.com/resources/extensions/plug-ins/group-x

      1. Create a content type, name could be whatever i.e. file_downloads
      2. This content type will be used to contain the fields that will show in the groupx 
      3. Create fields for this form/content type and here you need to store fields correctly...
      4. create new field for title i.e file_downloads_title
      5. set storage i.e. seblod syntax | article | file_gx[file_downloads_title]
      6. file_gx is name of column that groupx field will store in
      7. Create other fields the same way
      8. When created all fields, in your other content type (the one that will have tue groupx field) create your groupx field
      9. Name it File GX (file_gx)
      10. Set storage as seblod syntax | article | file_gx
The names can obviously change but hopefully you can see the format and principles at work here.

10 Posts
beato
4 years ago
0
Level 1

Hi,

Thanks again for the tutorial and the detailed description. I followed your steps and the one from the tutorial carefully (several times), but ended again with the same error as above. So I created a quite simple application - just an article with title, description field and a file select field (no group x...). All fields left on standard settings except the "Link" for the file select field (set to download).

The frontend view seems to be perfect, link is shown as "https://xxxxxxxxxxxxx/de/component/cck/?task=download&file=&id=294". A click on the link shows again error 1064 and so on.

Any further ideas?

4 years ago
0
Level 1

Hi beato,

thanks Bucklash for the help.

To be able to download a file from an Upload File field, you don't need to use the Link "Download"

As you are using an Upload File Field in a GroupX, simply add the GroupX Field in the Content View of your First Content Type.

IMPORTANT: In a GroupX, EACH fields must have NO STORAGE.

Then You can follow that:

1 - Content Type Parent - Admin Form View

2 - Content Type Parent - Content View

3 - GroupX Field setup:

Storage => my_article[download]

4 - Groupx Admin Form View

5 - GroupX Content View

---

Then, adding an article in backend:

The result in front-end

And nothing else.

Regards.

10 Posts
beato
4 years ago
0
Level 1

Hi Lionel,

Thank you very much for your detailed manual about setting up the group x. I'll try that later on.

I already used the upload file field and that worked perfectly. Now I've some files already on the server. Therefore I'd like to use the download link field as described here. If I set the "Link" to none I get displayed the stored path/file. I I set the "Link" to download I get the link but after clicking on the link I get the error 1064. 

So, do I misunderstand the functionality of this file download link field or is my usage of this field wrong?

Thanks, best regards
Beato

Get a VIP membership