Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-02-14 22:53:34

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

Multisite amends required for v 4.6

Just tried out the multi-site setup with v4.6.

I think in /sites/site1/admin folder,

  • the jquery.js symlink can be deleted, and
  • a new symlink for the vendors directory added in its place.

(that reinstates the correct function of the admin javascript and also the password quality check during setup).

And doesn’t the /sites/site1/public require the .htaccess file in it? (or the instruction to copy it over needs to go into the instructions). Or am I mistaken?

In the document root (i.e. the same directory as the /textpattern and sites directory, I still need css.php for the public css to show properly (when using txp’s in-built function), despite the fact that css.php already exists in the public folder. Is that correct?

The instructions do say I can delete the /files, /images, and index.php as these are now in the public folder. That I have done.

Are the phpstorm.meta.php, phpcs.xml and composer.json files still required? Or are they just for dev purposes.

Finally, is it correct that Admin > Diagnosis still shows some errors:

Pre-flight check: 
------------------------
/Users/xxxxxx/Sites/wja/textpattern/setup/ still exists
Missing files: 
	/../index.php
Site URL preference might be incorrect: admin.domain-name.de
------------------------

where

  • the first error is the setup directory in the shared /textpattern/ directory, which I presume I should not delete as I will need it again for future sites. The symlinks in the respective multi-site public folders are deleted.
  • and the site url pref is set to dev.domain-name.de. The admin and public sides still seem to function correctly.

TXP Builders – finely-crafted code, design and txp

Online

#2 2016-02-17 09:35:50

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Multisite amends required for v 4.6

I will take ownership of this issue, thanks for opening on GitHub.

Offline

#3 2016-02-17 13:25:29

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Multisite amends required for v 4.6

Please try the multi-site-fix branch of the GitHub repo and let me know how that works for you.

Offline

#4 2016-02-17 20:46:57

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

Re: Multisite amends required for v 4.6

Thanks, I’ll check that asap.


TXP Builders – finely-crafted code, design and txp

Online

#5 2016-02-18 11:32:05

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: Multisite amends required for v 4.6

As a casual observer who will one day be able to get back to the documentation, it would be useful to have feedback to Jakob’s original inquiries in order to update docs with the actual status and facts.

When you guys confirm everything is working as it should be, can you summarize what the file structure and overall functional behavior should be out of box.

For example, if there are specific Diagnostic messages that show when using multi-sites functionality, that would be good to know. That sort of thing.

Offline

#6 2016-02-20 00:58:34

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

Re: Multisite amends required for v 4.6

Hi Phil,

symlinks

It almost works but there seems to be something borked with the symlink. The symlink shows white rather than as a folder in the finder and doesn’t link correctly (screenshot – compare the symlink in beispiel-de (as-is) with that in example-com (relinked)). This is what the terminal shows me when I do ls -la:

lrwxr-xr-x@ 1 julian  staff   36 14 Nov 13:58 textpattern.css -> ../../../textpattern/textpattern.css
lrwxr-xr-x@ 1 julian  staff   35 14 Nov 13:58 textpattern.js -> ../../../textpattern/textpattern.js
lrwxr-xr-x@ 1 julian  staff   26 14 Nov 13:58 theme -> ../../../textpattern/theme
lrwxr-xr-x@ 1 julian  staff   29 20 Feb 00:39 vendors -> ../../../textpattern/vendors?

There’s a funny question-mark at the end, though that doesn’t show like that on github… maybe it’s not a folder symlink but a file symlink…

As a result, the “show password” checkbox and password strength meter don’t work in the setup routing, and after installation, the js-dependent parts of the UI in the admin area don’t respond (e.g. the menu dropdowns).

If I correct the symlink with unlink vendors and then ln -s ../../../textpattern/vendors vendors then it works correctly. I did this for the duplicate directory for a second multi-site, and it all worked fine from beginning to end.

Error messages / files you can and cannot delete

– Deleting the symlinks after installation as per the instructions works fine.

The diagnostics error messages you get are:

------------------------
/Users/julian/Sites/multisite/textpattern/setup/ still exists
Site URL preference might be incorrect: admin.example.com
------------------------

While these show as errors, they do not affect functionality. The /setup directory is indeed still in the multisite root directory and, I believe, is still needed to add future sites to your multisite installation. The site_url is actually dev.example.com (in my case) and functions correctly.

You can delete the /files, /images folders and index.php from the multisite root directory, as these are now used from the respective site’s /admin filder, but you get a few more error messages:

------------------------
File directory path is not writable: /Users/julian/Sites/multisite/files
Missing files: 
	/../index.php
------------------------

Again, these both make sense – both the index.php and files directory have been deleted – but don’t affect functionality. The “file path not writable” can be solved by changing the path in Admin > Preferences : Admin Prefs to match the new public directory, e.g. in my case /Users/julian/Sites/multisite/sites/example-com/public/files. This step needs to go in the instructions, e.g. something like this:

Visit Admin > Preferences and under the “Admin” preferences, correct the “File directory path” to match the files folder in your new site’s public directory, e.g. /path/to/user-root/{multisite base folder}/sites/{site folder}/public/files.

The other error messages stem, I guess, from a mismatch between the typical txpath and the multisites admin path. If a new path_to_admin constant/variable were added for testing diagnostics criteria (and also for use with admin-side plugins), that could be used for those diagnostics tests. In a regular txp installation path_to_admin would be the same as txpath, in a multisite installation, it would differ according to the multisite admin subdomain.

What you can’t delete is:

  • /setup directory in the base (common) textpattern directory, as you need it to install future sites (It’s php-included from the duplicate setup/index.php in the /admin folder). Without this you can’t add further sites to your multisite installation.
  • the css.php in the base directory of the multisite configuration as without this all txp:css tags cease to function. This is because it is php-included from in the css.php in the /public directory. As with a regular txp installation, it’s irrelevant if you link your css files directly.

BTW: This is all with Sam’s instructions for A. Multi-Site with separate admin area.

An important note mentioned elsewhere is that for this configuration (A), your host must allow you to point your domains/subdomain’s publicly accessible webroot to a folder that is above your user-root, e.g. you install textpattern and the multisite setup in a directory in your user directory, but your point your subdomains to:

  • www.domain.com => … /sites/my-site/public/
  • admin.domain.com => … /sites/my-site/admin/

Hosts that don’t allow that will need to use the other variant.

Afterthought:

To improve the setup routine and obviate the need for this at the end of step 2 of the instructions:

  • Textpattern will tell you to place your config.php file in /textpattern/. This is INCORRECT. Place it in the private subdirectory of your site. For example:

/sites/site1/private/config.php

  • IMPORTANT! When you create your config.php file, be sure to add the following line just before the closing ‘?>’ tag:

define(‘txpath’, $txpcfg[‘txpath’]);

The setup routine could have a [x] This will be a multi-site installation (i) checkbox that does:

  • changes the copy-paste content of the textarea to include the extra define instruction.
  • swaps out the path in the Before you proceed: Create a file called config.php in the /textpattern/ directory and paste the following inside… to use the correct path (or to suggest site/your-site-folder/private/).

TXP Builders – finely-crafted code, design and txp

Online

#7 2016-02-22 17:30:50

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Multisite amends required for v 4.6

@jakob I think I’ve corrected the symlink now – let me know. As mentioned previously – you are probably better placed than I to amend the README instructions as I’ve never used multi-site. Please fork the branch and make amends, then do a pull request and I will merge. Thanks!

Offline

#8 2016-02-23 09:35:11

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Multisite amends required for v 4.6

This has been merged into master now. Thanks!

Offline

Board footer

Powered by FluxBB