Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-07-29 16:59:04

Roche Rock resident
New Member
Registered: 2018-07-29
Posts: 2

Duplicate "/textpattern" element in pre-populated page

I installed Textpattern (V4.7.1) under Windows 7 Ultimate 64-bit yesterday for the first time, having previously installed IIS 7, PHP 7.2 and MySQL 5.7.23 (server-only; I failed to get MySQL V8 full install to work). All went smoothly apart from the problems trying to install MySQL V8, and I installed Textpattern into a CMS sub-directory (created just for this purpose) of the root directory of my local web site, having previously modified the file-system permissions to allow IUSR and my normal non-privileged account to have full access rights to the file hierarchy.

My problem comes when I look at the pre-populated file “Welcome to your site”, where I find (among other things)

What do you want to do next?

Modify or delete this article? The article list is the place to start.

Change this site’s name, or modify the style of the URLs? It’s all up to your preferences.

However, the hyperlinks from “article list” and “preferences” are wrong, both including a duplicate “/textpattern”, as in :

  • http://localhost/CMS/textpattern/textpattern/index.php?event=list
  • http://localhost/CMS/textpattern/textpattern/index.php?event=prefs

I am sure this must have been reported before, but I haven’t been able to locate such a report or the cure; can anyone advise, please ?

Offline

#2 2018-07-29 21:01:23

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

Re: Duplicate "/textpattern" element in pre-populated page

Hi, welcome to the forum and thanks for your report.

I guess from your description, you mean the links within the public-facing “Welcome” article that include informative links back to the admin area.

Can you clarify:

1) what you have in the file /textpattern/config.php for:

$txpcfg['txpath'] = ___

and

2) what you entered (or was prefilled) for “Site URL” during the setup routine.

That might help identify either the cause of the problem, or help to debug how it went wrong during installation.

Otherwise, does the Textpattern admin area work properly when you use the correct URL (with just one /textpattern in the URL)?

If it does work correctly, one explanation may be that the ‘Welcome’ article gets pre-populated during the installation routine and then added to the database. If the link details were wrong then, they won’t update later when you change your config.php or site settings in the preferences. You can, however, go in and edit the article in the admin area to manually correct the URLs. The ‘Welcome’ article serves merely as an introduction and is not otherwise needed for textpattern to function but obviously the links should be correct for first-time installations.

If the admin area doesn’t work properly despite the correct URLs, it may be traceable to the installation in a sub-directory. On an Apache server, the htaccess file has a commented out line that can be set to make all URL rewrites take place from a base path. You can uncomment that and adjust the path to match your subdirectory. That’s on an Apache server, though; on an IIS server, I believe you need to handle that differently. If you can set up a virtual local webhost on IIS, e.g. mydomain.test, try using that to point directly to the subdirectory and adjust your site url in the Textpattern preferences pane accordingly.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2018-07-29 21:11:55

Roche Rock resident
New Member
Registered: 2018-07-29
Posts: 2

Re: Duplicate "/textpattern" element in pre-populated page

Hallo, Jakob, and many thanks for your reply. Trying to resolve this for myself, I removed Textpattern and re-installed it several times; finally I realised that the field “Site URL” in the initial setup dialogue was incorrectly populated — it read (from memory) “http://localhost/sites/CMS/textpattern/” and I realised that this could not be correct; it should (of course) have read “http://localhost/sites/CMS/”. I corrected the error, and my problem disappeared. Finally I have a working “home” page and functional links. Very many thanks for all your help — vielen Dank !

Offline

#4 2018-07-29 21:37:01

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

Re: Duplicate "/textpattern" element in pre-populated page

Excellent, glad you got it fixed!

The installer attempts to guess the Site URL during the initial setup from the browser URL but may not always be right and may require manual adjustment. That’s used as a basis for generating the links in the welcome article, which explains the incorrect links.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB