embryonal multi-site support

I am currently hosting several basic sites that are more or less using the same ImpressCMS setup when it comes to modules. Core versions are not so frequent, but I'm using specific flavors of the content module for example where I do regular changes, and it's a chore to update all the sites, without forgetting one here and there.

so I was thinking  why not have one build that is common for all the sites, and just make the configuration different depending on the domain name that is used to reach the server? I could see some clashes with the cache that might need to be resolved, certainly if multiple sites use the same theme, off the top of my head, but I'm fairly confident that could be fixed quickly by adding the reference to the site domain.

I'll experiment and keep this thread updated.

Topic


Re: Git repository changes - moving branches

It did take me a few attempts to find the best way to accomplish this realignment in my local and remote repos, so I thought I'd share. And, since I haven't use the git command line much, I was working through Eclipse to figure it out. Following the steps above will also make sure you have the latest from the ImpressCMS repository - less to have to compare and merge into your repository.

Topic


Re: Git repository changes - moving branches

Thanks for the clear explanation on what to do!



Git repository changes - moving branches

There have been some changes you'll need to adjust your forks and local repositories to stay in sync with the core repository (https://github.com/ImpressCMS/impresscms). What was the 2.0.x branch is now labeled TNG (as in 'The Next Generation') and what was the 1.5.x branch is now the 2.0.x branch. This is to keep in line with the realization we had about the work done and the original scope we had for 2.0. David laid it all out in this post  - Version reshuffle. This renaming of the branches in git make things a little more clear when doing work for the various releases.

If you have forked ImpressCMS to work on it, the easiest thing to do is

  1. Delete the 2.0.x branch from your remote repository
  2. Delete the 2.0.x branch from your local repository
  3. Check out the new TNG branch from the ImpressCMS repository to your local repository
  4. Push that branch to your remote repository
  5. Do the same for the 1.5.x branch, except the new branch is what is now 2.0.x in the ImpressCMS repository

Alternatively, for moving the 2nd branch (1.5.x to 2.0.x), you could delete 1.5.x from your remote, rename your local 1.5.x branch to 2.0.x, and then push it to your remote. Your remote branch may still have a different upstream branch in the ImpressCMS repository.

If you have any branches that were created from either of those that you are still working in, you will need to update their upstream branch to point to the newly named branch.

If you don't delete the previous 2.0.x branch and the 1.5.x branch from both your remote and your local repository, you'll run into conflicts and potential duplication of branches.



Re: Standup Reports

PR waiting approval - Password reset: https://github.com/ImpressCMS/impresscms/pull/1527

Issue - Remove banner components from the db: https://github.com/ImpressCMS/impresscms/issues/1528

Issue - CKeditor customizations: https://github.com/ImpressCMS/impresscms/issues/1529

There are a few other improvements to work on. With these and the new theme from @fiammybe, I think we're ready for a release (RC)



Re: Standup Reports

works for me. I'll get a first beta version ready for inclusion by the end of the week.



Re: Standup Reports

We could bundle it the the release like we do with certain modules. At some point, we can make it the core theme.



Re: Standup Reports

If you want to include iTheme2 to this version, that would be great. I have been trying different modules and fixing stuff here and there, but I think we are not too far away from a first release of the theme. Getting feedback from different points of view and use cases would be great.

https://github.com/fiammybe/impresscms-itheme2



Re: Standup Reports

I think we've cleared all the known issues with this release. We had an open issue for MySQL 8 compatibility and I've done a fresh install and navigated through all the core functions without any errors. Time to bundle everything up and get some more hands on it.



Re: Standup Reports

I'm encountering errors in PHP 8.1 with the 'count()' use in some IPF instances. I'll create tickets and see what I can come up with.



Re: Standup Reports

Those updates have been applied. Now, in testing on PHP8.1, I've discovered another update is needed - HTMLPurifier. Again. I'm not sure how this was missed. It looks as though I tested it locally and never pushed the proper files to github.



Re: Standup Reports

During my final tests, there were some things we needed to address before releasing.

A couple more merge requests - an update to the GA4 plugin because it used a legacy class name and has a fatal error in 2.0. And, a final fix to the image editor so the plugins work now! (crop, resize, and filter were broken when using PHP8+). The changes for the theme selector block have also been approved are are ready to merge.

Once these have been merged, we can package and release 2.0RC!



Re: Standup Reports

Hi, 

  • I updated the PR for the GA4 preload. I took the one from ImpressCMS 1.4.6 for consistency.
  • I merged the approved PR for 8.1 compatibility.

I think we are ready for a 2.0 RC.

 



Re: Standup Reports

A patch was released for GA-4 for 1.4.4 and 1.3.11, as well as a new release - 1.4.5, specifically for the GA-4 update.

Things in progress -

  • The PR for the WideImage update is still waiting for a review. The issue with the editor still persists. I don't think it's a show-stopper.
  • The PR for the GA-4 update differs from the patch released and the 1.4.5 release. I propose we use what has been released. We could
    • merge the existing PR and then modify;
    • update the existing PR and then merge;
    • withdraw the existing PR and submit a new PR with the plugin from the 1.4.5 release
  • There is a new PR to update the installer to be compliant with PHP8.1. Review has been started.

I've also been looking at the HackerOne reports and working on prioritizing those for upcoming releases.



Re: Moving on from Google Universal Analytics

Small update on this : this patch is released in the 1.4.5 version which, essentially, applies the patch on top of 1.4.4

See the release announcement:



Re: Moving on from Google Universal Analytics

Here's a patch, if anyone wants to implement this and already haven't found a way to do it. I've bundled the files for both v1.3.11 and v1.4.4 into a single file.

There are 2 files to be concerned with - /libraries/icms/view/theme/Object.php and /plugins/preloads/googleanalytics.php. Make a backup of the first and replace with the file from the package for your version. Add the 2nd to the preloads folder.

Without any other changes, you should still be gathering data with the Universal Analytics tag. To us the new GA4 tag, you'll need to create a new property in Google Analytics to get your new tag. When you have it, update the value in your admin control panel of your site - Admin / Preferences / Meta + Footer. When you put in the new tag, include G- with the value. This is how ImpressCMS will know whether to use the UA version or the GA4 version.


Attach file:


zip GA4.zip Size: 19.22 KB; Hits: 130


Re: Standup Reports

PRs to the next release

  • HTMLPurifier - waiting  merged
  • WideImage - ready to request PR (without complete image editor fix) PR submitted
  • Fatal errors in session handler (improper type returned) - fix known (method updates to return boolean) PR submitted and merged
  • Fatal errors in Protector IP check (string v. integer) - merged

The Google Analytics update for GA4 is waiting on some minor changes, then it can be merged, too. We may even want to release a patch, since there are only days left before Google automatically changes



Re: Standup Reports

Just about. If our goal is for this release to run on PHP8, there are a few things that need to be addressed. If PHP7.4 is acceptable, then we are ready for another RC release.

The PR to update HTMLPurifier to work with PHP8 is waiting for review. Once that is merged, there aren't any fatal errors that I know of (one that I cannot reproduce during install, but occurs for another tester on Windows. We have a fix for that).

There is one thing that does not work on PHP8 - the image editor is the one I am  struggling with. It does work on PHP7.4, though. Mozilla's debug console says there is a missing semicolon in the javascript. But, only in PHP8+. So, something is being passed as an argument to the js functions that isn't properly formatted.

I'll fix the few other things I know about and leave the image editor for another time. More testers and eyes on the issue will help.

PRs to the next release

  • HTMLPurifier - waiting
  • WideImage - ready to request PR (without complete image editor fix)
  • Fatal errors in session handler (improper type returned) - fix known (method updates to return boolean)
  • Fatal errors in Protector IP check (string v. integer)

 



Re: Standup Reports

Would this be an appropriate time to release another RC?



Re: Standup Reports

I continued to test WideImage and the image editor.

Basis for further testing -

  • Used the latest release from github/smottt/WideImage (1.1.4)
  • Since it uses PSR-0, the icms autoloader works, and no specific includes or preloads are necessary

Initially I found that everything worked with the new WideImage library on ICMS 1.4.4 (max PHP is 7.4), but not in ICMS 2.0 with PHP 7.4. As it turns out, it was a preload method that was empty (icms_BootstrapEventHandler::backwardCompatibility). Adding a return value got it working on the 2.0.0RC branch (1.5.x) and PHP 7.4.

End result - all the functions work when using PHP 7.4. Switching to PHP 8.x results in failures when using the editor, whether it's crop, resize, or filter. Now, to figure out the PHP 8 issues.

It may, or may not, be something with the WideImage library. It may, or may not, be something with the image editor library. It may, or may not, be something with the core (the last issue was).

Another colleague has been helping me with this, as he now has some additional discretionary time. Hopefully, we'll figure this out soon.