Cannot install latest Solidres to Joomla 4.2.0

More
2 months 6 days ago #19297 by Thellie
Hi, as the title says really...

I've installed a new site to test Solidres on Joomla 4, with a view to using the HUB to rent space to local tour agencies/guides.

But, on trying to install, I'm getting the message:

0 Too few arguments to function pkg_solidresInstallerScript::postflight(), 2 passed and exactly 3 expected

I tried uploading the file, and also using the direct link.

Joomla is a completely fresh install with just Akeeba Backup, Admin Tools, and Akeeba Engage installed first.

Please Log in or Create an account to join the conversation.

More
2 months 6 days ago #19298 by Thellie
I have also tried installing inside Joomla 4 via the 'Install from web' option.

Same error...

Please Log in or Create an account to join the conversation.

More
2 months 6 days ago #19299 by Thellie
I may well be wrong, but it seems that only 2 of the 3 variables are being returned in the function below:
I can't see any reference to $parent other than in the first line...
This is the solidres.scriptfile.php

function postflight($type, $parent, $results)
{
if ($type == 'uninstall')
{
return true;
}

// Install content elements files
jimport('solidres.version');
$destinationDir = JPATH_SITE . '/administrator/components/com_falang/contentelements/';
$sourceDir = JPATH_SITE . '/administrator/components/com_solidres/falang/';

if (JFolder::exists($destinationDir))
{
$files = JFolder::files($sourceDir);
if(!empty($files))
{
foreach($files as $file)
{
JFile::copy($sourceDir . $file, $destinationDir . $file);
}
}
}

$installedVersion = '2.12.9';

echo '
<style>
.solidres-installation-result {
margin: 15px 0;
}
.solidres-installation-result .solidres-ext {
padding: 8px;
border-left: 3px solid #63B75D;
background: #EEE;
margin: 0 0 2px 0;
}
.solidres-installation-result label {
font-weight: bold;
margin-bottom: 0;
display: inline-block;

}
.solidres-installation-result ul {
margin: 20px 0 20px 10px;
}

.solidres-installation-result ul li {
list-style: none;
}

.solidres-installation-result dl dd,
.solidres-installation-result dl dt{
margin-bottom: 5px;
}
</style>
';

echo '<div class="row-fluid row solidres-installation-result">
<div class="span6 col-md-6">
<img src="'. JUri::root() .'/media/com_solidres/assets/images/logo425x90.png" alt="Solidres\'s logo"/>
<dl>
<dt>Solidres ' . $installedVersion . ' Stable has been installed/upgraded successfully.</dt>
<dd><span class="badge badge-success">1</span> Please visit our <a href="www.solidres.com/blog" target="_blank">Blog for full change log (new features, bug fixes, improvements, ...) of this version.
<dd><span class="badge badge-success">2</span> If you are a Solidres\'s subscriber, don\'t forget to update all installed plugins/modules (Complex Tariff, Invoice, Limit Booking, Hub etc) to ensure maximum compatibility with new version.</dd>
<dd><span class="badge badge-success">3</span> Make sure that you visit our website to find new releases for your installed solidres\'s plugins and update them as well (if available).</dd>
<dd><span class="badge badge-success">4</span> Make sure that all template override files are updated accordingly to this new version.</dd>
<dd><span class="badge badge-success">5</span> Make a test reservation to make sure everything works normally.</dd>
</dl>
<dl>
<dt>Useful links</dt>
<dd><a href="index.php?option=com_solidres&view=system" target="_blank">Your Solidres system page</a></dd>
<dd><a href="www.solidres.com" target="_blank">Solidres Official Website
<dd><a href="www.solidres.com/documentation" target="_blank">Solidres Documentation Site
<dd><a href="www.solidres.com/support/frequently-asked-questions" target="_blank">Frequently asked questions
<dd><a href="www.solidres.com/forum/index" target="_blank">Solidres Community Forum
<dd><a href="www.solidres.com/subscribe/levels" target="_blank">Become a subscriber to access more features and official support
</dl>
<p><a href="'.JUri::root().'/administrator/index.php?option=com_solidres" class="btn btn-primary"><i class="icon-out "></i> Go to Solidres now</a></p>
</div>
<div class="span6 col-md-6">';

foreach ($results as $result)
{
echo '<div class="solidres-ext '.($result == true ? 'ok' : 'not-ok' ).'">';
echo '<label>' . $result . '</label>';
echo ' has been ' . ($type == 'install' ? 'installed' : 'upgraded' );
echo ($result == true ? ' successfully' : ' failed' ) . '</div>';
}

echo ' </div>
</div>';

// Enable Pay Later and Bank Wire payment plugins
if ($type == 'install')
{
$dbo = JFactory::getDbo();
$query = $dbo->getQuery(true);

$query->clear();
$query->update($dbo->quoteName('#__extensions'));
$query->set('enabled = 1');
$query->where("element = " . $dbo->quote('bankwire') . " OR element = " . $dbo->quote('paylater'));
$query->where("type = ". $dbo->quote('plugin'));
$query->where("folder = " . $dbo->quote('solidrespayment'));

$dbo->setQuery($query);

$result = $dbo->execute();
if(!$result)
{
JFactory::getApplication()->enqueueMessage('plg_solidrespayment_bankwire/plg_solidrespayment_paylater: publishing failed', 'warning');
}
else
{
JFactory::getApplication()->enqueueMessage(JText::_('plg_solidrespayment_bankwire is published successfully.'));
JFactory::getApplication()->enqueueMessage(JText::_('plg_solidrespayment_paylater is published successfully.'));
}
}
}

Please Log in or Create an account to join the conversation.

More
2 months 5 days ago #19301 by solidres
Replied by solidres on topic Cannot install latest Solidres to Joomla 4.2.0
Hi,

It is a confirmed bug, as Joomla 4.2 changed a function arguments.

We are working on releasing an official update, in the meantime please install Joomla 4.1, then install Solidres and upgrade to Joomla 4.2 later.

Regards,

Please Log in or Create an account to join the conversation.

More
2 months 5 days ago #19303 by Thellie
Okay,
Have deleted everything, installed Joomla 4.1.5 and Solidres... working properly, thanks :)

Please Log in or Create an account to join the conversation.

Moderators: solidres
Powered by Kunena Forum

All the things you need to make your work easier. Did you like Solidres?