First written in 2010, rewritten in 2016 for Joomla 3, and now rewritten again for Joomla 4/5 with all kinds of difficulties arising over a long development time, my component for viewing the history of concerts in our orchestra is at last functioning beautifully in my wamp64 environment on two different laptops, as is the process of restoring the localhost sites from Akeeba backups in both cases. My plan is simply to restore my local site to the live site. The great day for release to the main site arrived a couple of days ago, and I cannot get it to work.
I've checked all the obvious things - php version, MySQL version, possible corrupt backup (but same behaviour with backups from both laptops) and have run the Forum Post Assistant, which at first told me my online host's version of mySQL needed upgrading, which I have now fixed, and then the new mySQL version told me during the retoration that there were some foreign keys it didn't like which I therefore removed before creating a further new backup (and a FPA result without any problems reported).
1. My first restore gave the same error on both site and administrator: can't find component HCOCONCERTSCOMPONENT. Using exactly the same restore process in my wamp64 environments, no such error appears, and the autoload_psr4 file contains two more lines . So something is happening (in the live linux hosting environment as opposed to the Windows wamp64?). I've tried searching for incorrect use of forward and back spaces (confusion between namespaces and directory paths) but insofar as my limited understanding of namespaces I think everything looks OK.
I found that the autoload_psr4.php contained no mention of my component. When I edited it manually and added the two lines (for site and admin) which appear in my wamp64 versions, both site and admin start and function correctly until I access a a part of the site that uses my component. Front end (site) gives the error "500 - Layout default not found." although all tmpl default files are present and correct. The Administrator part gives the error An error has occurred. 0 count(): Argument #1 ($value) must be of type Countable|array, null given.
So
(a) is it possible that the restoration process is not registering my component and so re-creating an autoload file with out it being mentioned? And
(b) why would it work differently in the two different environments?
If I could re-create the problem in my wamp64 environment I could easily track it down, but it all works perfectly.
Any advice, please, on how to tackle the problem? I feel completely stymied.
I've checked all the obvious things - php version, MySQL version, possible corrupt backup (but same behaviour with backups from both laptops) and have run the Forum Post Assistant, which at first told me my online host's version of mySQL needed upgrading, which I have now fixed, and then the new mySQL version told me during the retoration that there were some foreign keys it didn't like which I therefore removed before creating a further new backup (and a FPA result without any problems reported).
1. My first restore gave the same error on both site and administrator: can't find component HCOCONCERTSCOMPONENT. Using exactly the same restore process in my wamp64 environments, no such error appears, and the autoload_psr4 file contains two more lines . So something is happening (in the live linux hosting environment as opposed to the Windows wamp64?). I've tried searching for incorrect use of forward and back spaces (confusion between namespaces and directory paths) but insofar as my limited understanding of namespaces I think everything looks OK.
I found that the autoload_psr4.php contained no mention of my component. When I edited it manually and added the two lines (for site and admin) which appear in my wamp64 versions, both site and admin start and function correctly until I access a a part of the site that uses my component. Front end (site) gives the error "500 - Layout default not found." although all tmpl default files are present and correct. The Administrator part gives the error An error has occurred. 0 count(): Argument #1 ($value) must be of type Countable|array, null given.
So
(a) is it possible that the restoration process is not registering my component and so re-creating an autoload file with out it being mentioned? And
(b) why would it work differently in the two different environments?
If I could re-create the problem in my wamp64 environment I could easily track it down, but it all works perfectly.
Any advice, please, on how to tackle the problem? I feel completely stymied.
Statistics: Posted by DerekE — Thu May 16, 2024 9:51 pm