Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-12-29 23:06:47

Ian Vannieuwkerke
New Member
Registered: 2020-12-29
Posts: 7

Uploaded files are stored in the wrong map

Hi,
for our scouts website we use textpattern to post announcements, info, activities on our website. we have always had the problem when we upload files (pdf, …..) in textpattern, the files are not visible on our site. We are working with cPanel as hosting site, I noticed that the uploaded files end up in the wrong folder. they come in the “Files” folder right under the “Textpattern” folder. While they should be in the folder “Files” under the folder “Public_HTML”.
The only solution I have found so far is to manually move the files from folder.

I have once contacted cPanel and they say that there is an error setting in textpattern somewhere.

I have some knowledge of html, css, javascript and php. But nothing at all from Textpattern. The website was built a long time ago, so I myself don’t have a very good knowledge of how it works.

I wonder what exactly is the cause and what could possibly serve as a solution

Last edited by Ian Vannieuwkerke (2020-12-29 23:08:42)

Offline

#2 2020-12-29 23:55:46

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: Uploaded files are stored in the wrong map

Hi and welcome to the forum.

The first thing to check would be your preferences. From your Textpattern back-end, navigate to Admin>Preferences, then click the Admin group on the left. Check the value of the ‘File directory path’ and ensure it is set to the root ‘files’ directory for your site under public_html.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2020-12-30 00:14:24

Ian Vannieuwkerke
New Member
Registered: 2020-12-29
Posts: 7

Re: Uploaded files are stored in the wrong map

the file directory path is set to “files”, due to some other problems with the site, changing the path from “root” to “files” was a solution. When i restore the path to root we get the “404 Not Found The requested resource was not found” message in some places on the site.

Offline

#4 2020-12-30 05:41:00

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: Uploaded files are stored in the wrong map

Hi Ian and welcome to txp

I take it that you do not have txp installed in the site root directory. The directory where the files are uploaded should be set using a path ie. /path/to/your_site/Public_HTML/files

ps. If your site was build a long time ago, as you say, the textpattern installation may need updating but let’s solve the problem at hand first.

Last edited by colak (2020-12-30 06:26:36)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2020-12-30 22:34:17

Ian Vannieuwkerke
New Member
Registered: 2020-12-29
Posts: 7

Re: Uploaded files are stored in the wrong map

is there a way to check if txp is installed in the site root directory ?
The directory where the files are uploaded is:
File directory path: Files
Temporary directory path: /Home/devleerm/public_html/textpattern/temp

(“devleerm” is the abbreviated name of our site the reason why it is abbreviated is do not know. our scouting group is called “de vleermuis” which means bat in english)

i have checked the textpattern version in the diagnostics tab:

(I copied the top lines, no idea if this contains useful info for you?)

Textpattern version: 4.5.5 (r5575)
Last update: 2013-12-13 17:20:28/2013-12-14 14:57:30
Document root: /home/devleerm/public_html
$path_to_site: /home/devleerm/public_html
Textpattern path: /home/devleerm/public_html/textpattern
Permanent link mode: section_title
Temporary directory path: /home/devleerm/public_html/textpattern/tmp

EDIT: bc.. added

Last edited by Ian Vannieuwkerke (2020-12-30 22:34:43)

Offline

#6 2020-12-30 22:53:53

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: Uploaded files are stored in the wrong map

Hi Ian,

is there a way to check if txp is installed in the site root directory ?

Your Document root / $path_to_site indicates correctly that your textpattern installation is properly installed into the public facing root directory. That’s very typical for a cPanel-managed site.

All you should need to do is in the Admin › Preferences : Admin settings, set File directory path to:

/home/devleerm/public_html/files/

And click Save.

Additionally, make sure that folder is writable. To do that in cPanel, see “How to Assign Permissions to Files and Folders With File Manager” on this page and set to 775 (and if that does not work to 777).

You said you had moved your files to that folder, so they should now download correctly. New files should be uploaded straight into that directory too.


TXP Builders – finely-crafted code, design and txp

Offline

#7 2020-12-31 06:25:10

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: Uploaded files are stored in the wrong map

/home/devleerm/public_html/files/

Is the last slash needed or should it be /home/devleerm/public_html/files?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#8 2020-12-31 11:33:15

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,134
GitHub

Re: Uploaded files are stored in the wrong map

Ian Vannieuwkerke wrote #327903:

(“devleerm” is the abbreviated name of our site the reason why it is abbreviated is do not know. our scouting group is called “de vleermuis” which means bat in English)

For your information, many hosting organisations will take the given customer name, make it lower case, remove or replace any non-standard characters, remove the spaces, and use the first 8 characters in the server file system:

De Vleermuis -> de vleermuis -> devleermuis -> devleerm

This is a common thing and makes the administration much more straightforward. It’s typically not something you can change as a user. Do not be concerned.

Offline

#9 2020-12-31 15:09:51

Ian Vannieuwkerke
New Member
Registered: 2020-12-29
Posts: 7

Re: Uploaded files are stored in the wrong map

jakob wrote #327905:

Hi Ian,

Your Document root / $path_to_site indicates correctly that your textpattern installation is properly installed into the public facing root directory. That’s very typical for a cPanel-managed site.

All you should need to do is in the Admin › Preferences : Admin settings, set File directory path to:

/home/devleerm/public_html/files/...

And click Save.

Additionally, make sure that folder is writable. To do that in cPanel, see “How to Assign Permissions to Files and Folders With File Manager” on this page and set to 775 (and if that does not work to 777).

You said you had moved your files to that folder, so they should now download correctly. New files should be uploaded straight into that directory too.

Hi jakob,

Thanks, now the files are uploaded to the correct folder “files” in het map “public_html”

I set the folder to writable both 755 and 777 but the files are not visible.
404 Not Found The requested resource was not found, appears again

Last edited by Ian Vannieuwkerke (2020-12-31 15:15:18)

Offline

#10 2020-12-31 15:13:21

Ian Vannieuwkerke
New Member
Registered: 2020-12-29
Posts: 7

Re: Uploaded files are stored in the wrong map

colak wrote #327908:

Is the last slash needed or should it be /home/devleerm/public_html/files?

With no slash, the uploaded file does not appear in either file folders.

Offline

#11 2020-12-31 15:14:25

Ian Vannieuwkerke
New Member
Registered: 2020-12-29
Posts: 7

Re: Uploaded files are stored in the wrong map

gaekwad wrote #327923:

This is a common thing and makes the administration much more straightforward. It’s typically not something you can change as a user. Do not be concerned.

Thanks for the information

Offline

#12 2020-12-31 15:36:28

Ian Vannieuwkerke
New Member
Registered: 2020-12-29
Posts: 7

Re: Uploaded files are stored in the wrong map

!!!!Update!!!!!,
the problem is fixed thanks for the support en tips for resolving the problem.
changing the path was the solution but it took a minute before working somehow.

Offline

Board footer

Powered by FluxBB