Support

Site Restoration

#40509 substr(): Argument #1 ($string) must be of type string, array given

Posted in ‘Site restoration’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
8.2
CMS Type
Joomla!
CMS Version
5.0.4
Backup Tool Version
9.9.0 I think but I can't logi
Kickstart version
8.0.4

Latest post by UglyEoin on Monday, 29 April 2024 15:27 CDT

UglyEoin

Using Kickstart 7.0.4 and a recent Joomla 5 backup.

On the final step of the installation, where I choose the Site Parameters I get an application error.

 

Application Error

Please submit the following error message and trace in its entirety when requesting support

TypeError — substr(): Argument #1 ($string) must be of type string, array given

/home/jcdryliningltdco/public_html/dev/installation/platform/models/joomlasetup.php::L1014

#0 /home/jcdryliningltdco/public_html/dev/installation/platform/models/joomlasetup.php(1014): substr()
#1 [internal function]: AngieModelJoomlaSetup->{closure}()
#2 /home/jcdryliningltdco/public_html/dev/installation/platform/models/joomlasetup.php(1013): array_map()
#3 /home/jcdryliningltdco/public_html/dev/installation/platform/models/joomlasetup.php(1183): AngieModelJoomlaSetup->updateAdminToolsAllowedDomains()
#4 /home/jcdryliningltdco/public_html/dev/installation/platform/models/joomlasetup.php(55): AngieModelJoomlaSetup->updateAdminToolsParams()
#5 /home/jcdryliningltdco/public_html/dev/installation/angie/controllers/base/setup.php(23): AngieModelJoomlaSetup->applySettings()
#6 /home/jcdryliningltdco/public_html/dev/installation/framework/controller/controller.php(511): AngieControllerBaseSetup->apply()
#7 /home/jcdryliningltdco/public_html/dev/installation/framework/dispatcher/dispatcher.php(264): AController->execute()
#8 /home/jcdryliningltdco/public_html/dev/installation/framework/application/application.php(177): ADispatcher->dispatch()
#9 /home/jcdryliningltdco/public_html/dev/installation/index.php(130): AApplication->dispatch()
#10 /home/jcdryliningltdco/public_html/dev/installation/index.php(245): mainLoop()
#11 {main}


System Task
system
The ticket information has been edited by Eoin Oliver (UglyEoin).

nicholas
Akeeba Staff
Manager

Kickstart only extracts the backup archive, it does not restore it. The restoration script (ANGIE) is included in the backup archive itself.

Kickstart 7 is too old, and should not be used with PHP 8. You will eventually have to start using a new version.

None of the above have anything to do with your problem.

After extracting the backup archive and before clicking on "run the installer" edit the file installation/platform/models/joomlasetup.php.

Find line 981 which currently reads

if (empty($allowedDomains))

and change it to

if (empty($allowedDomains) || true)

Now go back to Kickstart and click on Run the Installer.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

UglyEoin

I'm using Kickstart 8.0.4 not 7.

 

I changed the file and I now get this error

 

TypeError — substr(): Argument #1 ($string) must be of type string, array given

/home/jcdryliningltdco/public_html/dev/installation/platform/models/joomlasetup.php::L1014

nicholas
Akeeba Staff
Manager

I'm using Kickstart 8.0.4 not 7.

Look, your ticket info says Kickstart 8.0.4, the body text of your ticket says 7.0.4. I will always go for the pessimistic option when I have conflicting information. If I don't, chances are that would be the most relevant problem :)

I changed the file and I now get this error

Um, the error tells me you didn't change the line. Did you change the line after extracting the backup archive, as I told you? Remember, if you change it before running Kickstart, Kickstart will extract the backup archive again and your change will be overwritten.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

UglyEoin

Ah yes, of course, it helps if you write the right numbers!

I'm guessing I possibly made that mistake and edited before the extraction maybe. 

In any case I've just uploaded a new site as it was quicker and I felt foolish wasting time on it when I could so easily achieve the result in a different way. 

Even so perhaps reporting it helps solve a bug or something for someone else.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!