Upgrading from unpublished Virtual Domains extension to forked version on GitHub

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
Diver001
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Feb 07, 2024 1:27 am

Upgrading from unpublished Virtual Domains extension to forked version on GitHub

Post by Diver001 » Wed Feb 07, 2024 2:03 am

I am running Joomla! 3.x, and have several subdomains, like
shop.mydomain.com
library.mydomain.com
videos.mydomain.com
and many years ago I installed the Virtual Domains extension so that I could have one Joomla! installation handling all of these, with some shared templates & content, and so on.
Unfortunately, the original creators of Virtual Domains (janguo-de) seem to have stopped maintaining it a few years ago, and it no longer supports current versions of PHP. Hence my website is stuck using an old version of PHP (this has been one thing holding me back from moving to Joomla! 4.x*). Furthermore, the extension is currently marked "This extension has been unpublished for the following reason: UR1: Broken Links," in the official Extensions Directory.

I thought this was an almost insurmountable obstacle until, by chance, I discovered that some kind and skilful individuals have forked the original code to improve it, including making it compatible with new versions of PHP.

So, my two questions are, which fork/branch to use, and how to use it.

Forks & branches There is some difference between tkempf master-alt and caincoulton (equivalently: between tkempf master-alt and tkempf master), but I'm not sure what to make of it.
Maybe "PHP 7.1 and later" means effectively PHP 7.x?
Would "supports PHP8" also mean it works with older versions of PHP, including PHP 7.x?
Which should be better to use?

Downloading file(s), and building /installing package
The simplest option would be to follow the advice as at caincoulton, "Download the latest release and install the package in Joomla." Unfortunately there's no latest release.
Probably I can download something from GitHub. What? How?
Do I need to build it?
Should I upload it to the server that hosts my website, and then somehow use Phing? It doesn't seem quite enough information to say, "Just typing `phing` will build the package." Surely it has to be something like `phing [package-name]`, or at least I would have to be doing this in a particular subdirectory?
Or should I download whatever files from GitHub, then build on Windows (with merely `php phing-latest.phar`???), and then upload those built files (as a package???) to the website's server?

Or, I could go for the package from 2018 produced by smehrbrodt.

Importantly, I would like that this merely updates the existing (old, original) Virtual Domains extension that's already installed. By no means would I want to have to reconfigure everything from scratch.

-----
* Another thing is that I never managed to get WAMP working fully, so all my changes get made on the live website....

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17445
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Upgrading from unpublished Virtual Domains extension to forked version on GitHub

Post by toivo » Wed Feb 07, 2024 2:47 am

Welcome to the Joomla forum!

Diver001 wrote:
Wed Feb 07, 2024 2:03 am
I never managed to get WAMP working fully
Did you follow the installation instructions from the sticky topics at the Wampserver Forum? They contain the necessary information to install Wampserver.

The other go-to website is the alternative repository at https://wampserver.aviatechno.net/. All the PHP, MySQL, MariaDB and Apache extensions with tools and Visual C++ Redistributable Packages are there and they are regularly updated.
Toivo Talikka, Global Moderator

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44096
Joined: Sat Apr 05, 2008 9:58 pm

Re: Upgrading from unpublished Virtual Domains extension to forked version on GitHub

Post by Webdongle » Wed Feb 07, 2024 2:55 am

If wamp fails for lack of c++ then uninstall it before installing c++. The link for c++ is at the bottom of https://wampserver.aviatechno.net/
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

Diver001
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Feb 07, 2024 1:27 am

Re: Upgrading from unpublished Virtual Domains extension to forked version on GitHub

Post by Diver001 » Wed Feb 07, 2024 5:47 am

Webdongle wrote:
Wed Feb 07, 2024 2:55 am
If wamp fails for lack of c++ then uninstall it before installing c++. The link for c++ is at the bottom of https://wampserver.aviatechno.net/
WAMP is not my focus, to be clear. I eventually installed WAMP and it runs. It is not crashing or coming up with an error. I got some very, very simple (static) HTML working in it. And I think I had a go at installing Joomla 4 alpha. But nevertheless WAMP is useless to me, as it was so complicated/cumbersome.

Diver001
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Feb 07, 2024 1:27 am

Re: Upgrading from unpublished Virtual Domains extension to forked version on GitHub

Post by Diver001 » Wed Feb 07, 2024 5:50 am

toivo wrote:
Wed Feb 07, 2024 2:47 am
Did you follow the installation instructions from the sticky topics at the Wampserver Forum?
The other go-to website is the alternative repository at https://wampserver.aviatechno.net/.
To be clear, WAMP is not my focus. I found it extremely troublesome to set up, and had to search high and low to get a configuration that actually worked. Cannot remember where I looked, but many places. There was no simple step-by-step guide that worked for me.
Couldn't figure out how to link my actual website to WAMP (or vice versa) directly or indirectly, and eventually gave up.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17445
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Upgrading from unpublished Virtual Domains extension to forked version on GitHub

Post by toivo » Wed Feb 07, 2024 6:50 am

Diver001 wrote:
Wed Feb 07, 2024 5:50 am
There was no simple step-by-step guide that worked for me.
Try those sticky topics. They are detailed and helpful.

Diver001 wrote:
Wed Feb 07, 2024 5:50 am
Couldn't figure out how to link my actual website to WAMP (or vice versa) directly or indirectly, and eventually gave up.
Use Akeeba Backup and Kickstart to transfer one .jpa file, containing the filesystem and the database.
Toivo Talikka, Global Moderator

Diver001
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Feb 07, 2024 1:27 am

Re: Upgrading from unpublished Virtual Domains extension to forked version on GitHub

Post by Diver001 » Wed Feb 07, 2024 11:46 am

OK, thanks for the suggestions about WAMP. It really wasn't my priority, because it chewed up so much of my time the first time around for almost zero benefit. (For example, one of the recommended stickies says "If you want to use PHP in FCGI mode", so then I would have to spend a heap of time figuring out what that means, do I need it, or want it. Please do not explain FCGI mode to me now: I am just mentioning it as an illustration of how installing & using WAMP is not simple at all. There's also mention of xDebug, and I have a vague recollection of this being yet another thing I had to investigate at the time.)
I am willing to install/upgrade Extensions without WAMP (which I've done before, but not from a GitHub fork), and potentially also upgrade Joomla! itself without WAMP (certainly I have done many minor updates before, but not a major version upgrade).
Nevertheless, Akeeba Backup at least looks useful.

Do you have any advice on my queries regarding Virtual Domains?
Or are you implying that it would be extremely difficult to do without WAMP?

I didn't really want to get too far off track, but I have unresolved issues using FTP (it used to work, currently doesn't work), and my laptop HDD is nearly full & on the verge of being replaced. So right now if there's something that can simply be done on the server, that'd be advantageous.
Actually, it did occur to me to potentially set up an unadvertised folder under public_html on the server just for testing, and copy the existing website there too. But I have a feeling that wouldn't be quite as simple as it sounds either (e.g. problems with .htaccess, URL rewriting, subdomains, internal links, ...).

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44096
Joined: Sat Apr 05, 2008 9:58 pm

Re: Upgrading from unpublished Virtual Domains extension to forked version on GitHub

Post by Webdongle » Wed Feb 07, 2024 12:51 pm

Creating a folder in the public_html folder would be OK so long as you can create a subdomain to it. A lot depends on your Hosting.

1. Some Hosting creates a folder for sub domains under the public_html this could cause problems with Joomla
2. Other Hosting allows the user to point the subdomain to a folder of the users choice.
If #2 Use Akeeba to install the copy to the subdomain folder and a new empty database that you set up.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

Diver001
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Feb 07, 2024 1:27 am

Re: Upgrading from unpublished Virtual Domains extension to forked version on GitHub

Post by Diver001 » Sat Feb 10, 2024 8:38 am

Diver001 wrote:
Wed Feb 07, 2024 5:50 am
toivo wrote:
Wed Feb 07, 2024 2:47 am
Did you follow the installation instructions from the sticky topics at the Wampserver Forum?
The other go-to website is the alternative repository at https://wampserver.aviatechno.net/.
To be clear, WAMP is not my focus. I found it extremely troublesome to set up, and had to search high and low to get a configuration that actually worked. Cannot remember where I looked, but many places. There was no simple step-by-step guide that worked for me.
Couldn't figure out how to link my actual website to WAMP (or vice versa) directly or indirectly, and eventually gave up.
Just checked my old bookmarks, FYI.
First looked into XAMPP, WAMP etc. in 2016. Looked more seriously in 2019 and 2021/2022. Bookmarked:
http://www.slideshare.net/abhibhukan/co ... amp-server
https://www.eclipse.org/forums/index.php/t/1066713/
http://www.wampserver.com/en/
https://www.apachefriends.org/index.html
https://www.instructables.com/id/Debug- ... n-Windows/
http://forum.wampserver.com/read.php?2,134915
http://forum.wampserver.com/list.php?2
https://stackoverflow.com/questions/167 ... al-machine
FWIW, I also bookmarked the following local URL's
http://testing/TestXYZ/
http://localhost/Joomla_4-0-0-a11/admin ... w=articles
http://localhost/Joomla_4-0-0-a11/index ... ntent&id=2

Anyway, this discussion was intended to be mainly about the Virtual Domains extension.

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2909
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Upgrading from unpublished Virtual Domains extension to forked version on GitHub

Post by SharkyKZ » Sat Feb 10, 2024 10:53 am

Your best bet would be to ask the developers how they intend to maintain these forks and whether their forks are stable for production use. From a quick look at the changes I can see that tkempf's fork maintains compatibility with J3 whereas caincoulton's fork is compatible with J4+ only. So that's at least one major difference.
Maybe "PHP 7.1 and later" means effectively PHP 7.x?
For the most part, yes. PHP generally does not introduce breaking changes in minor versions, although there are some exceptions for minor behavioral changes. It can also introduce deprecation messages but that shouldn't be an issue because error display should be disabled in production anyways.
Would "supports PHP8" also mean it works with older versions of PHP, including PHP 7.x?
You'd have to review the code or ask the developers. If they're not using any PHP 8+ syntax or features, it should work on PHP 7 too. This seems to be the case here for now.
Probably I can download something from GitHub. What? How?
Do I need to build it?
First you'll need to either checkout the repository or download the source code directly from Github. The rest depends on which fork you use. tkempf's fork already has a Composer file with Phing dependency. So you can run these commands to build the package:

Code: Select all

composer install
vendor/bin/phing build
coincoulton's fork does not have a Composer file so you have to install Phing manually. Either globally on your PC or locally in the repository/source directory. See Phing documentation https://www.phing.info/.
Once you build the package you can then install it on your Joomla site.


Post Reply

Return to “Extensions for Joomla! 3.x”