Keyword

RadioWave Template For J4!

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
4 months 1 week ago #181364 by Hollo Robert
RadioWave Template For J4! was created by Hollo Robert
Hello!
I started rewriting the RadioWave template for the J4.
I encountered the following error:
Compilation error: Cannot redeclare nuText() (previously declared at /var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/templates/radiowave/includes/helper.php:57)
(500 Oops, it looks like something went wrong.)

Line 57 of helper.php:
// Convert language strings to JSON-friendly format for error/offline pages
function nuText($str)
{
      return str_replace("'", "\\'", JText::_($str));
}

What should I rewrite so that I don't get this error?
and another error:
Fatal error: nuText() (formerly in /var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/templates/radiowave/includes/helper.php:57) cannot be redeclared in /var/www /clients file. /client370/web1299/web/hirdetnijo.eu/lrt/templates/radiowave/includes/error.php on line 42
line 42 of error.php:
// Convert language strings to JSON-friendly format for error/offline pages
function nuText($str)
{
      return str_replace("'", "\\'", JText::_($str));
}
What should I change in the contents of the files to make it work?
I look forward to your soonest and respectful answers!
Thank you in advance for your help!
Best regards.: Robert

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

More
4 months 1 week ago #181366 by JoomlaWorks
Replied by JoomlaWorks on topic RadioWave Template For J4!
If the error.php sub-template includes the helper.php file, you can safely delete the nuText function inside error.php.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
4 months 1 week ago #181368 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
Hello, Hi Fotis!
I got another error message:
Error ClassNotFoundError
HTTP 500 Whoops, looks like something went wrong.
Attempted to load class "JRequest" from the global namespace.
Did you forget the "use" statement?
Exceptions 2Stack Traces 2
Symfony\Component\ErrorHandler\Error\
ClassNotFoundError
in /var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/templates/radiowave/error.php (line 27)
$templatePath = JURI::base(true).'/templates/'.$this->template;/*
Requests ----
*/$option = JRequest::getCmd('option');$view = JRequest::getCmd('view');$layout = JRequest:: getCmd('layout');$page = JRequest::getCmd('page');$task = JRequest::getCmd('task');$id = JRequest::getInt('id');
require()
in /var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/libraries/src/Document/HtmlDocument.php (line 736)
HtmlDocument->_loadTemplate('/var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/templates/radiowave', 'error.php')
in /var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/libraries/src/Document/HtmlDocument.php (line 791)
HtmlDocument->_fetchTemplate(array('template' => 'radiowave', 'directory' => '/var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/templates', 'debug' => true , 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
in /var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/libraries/src/Document/HtmlDocument.php (line 608)
HtmlDocument->parse(array('template' => 'radiowave', 'directory' => '/var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/templates', 'debug' => true , 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
in /var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/libraries/src/Document/HtmlDocument.php (line 626)
HtmlDocument->render(false, array('template' => 'radiowave', 'directory' => '/var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/templates', 'debug' = > true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
in /var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/libraries/src/Document/ErrorDocument.php (line 139)
ErrorDocument->render(false, array('template' => 'radiowave', 'directory' => '/var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/templates', 'debug' = > true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
in /var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/libraries/src/Error/Renderer/HtmlRenderer.php (line 78)
HtmlRenderer->render(object(Error))
in /var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/libraries/src/Exception/ExceptionHandler.php (line 121)
ExceptionHandler::render(object(Error))
in /var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/libraries/src/Exception/ExceptionHandler.php (line 72)
ExceptionHandler::handleException(object(Error))
in /var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/libraries/src/Application/CMSApplication.php (line 323)
CMSApplication->execute()
in /var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/includes/app.php (line 61)
require_once('/var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/includes/app.php')
in /var/www/clients/client370/web1299/web/hirdetnijo.eu/lrt/index.php (line 32)
Error
Class "JRequest" not found

What do we replace JRequest with?
Could someone send a specific table of which function, command, etc. what should we use instead for Joomla4 /PHP8?
Thank you in advance for your help!
Best regards.: Robert

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

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
4 months 1 day ago #181374 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
Hello!

I can't fix this error when rewriting RadioWave!
Cannot access protected property Joomla\CMS\Menu\MenuItem::$params
I read that $params was replaced by $getParams, but for some reason I can't solve this.
In the .php files of the RadioWave template, I find $this->params->get() values in several places, should I copy them individually to $getParams()?
Because I don't understand why it gives this error!!!
If debugging is turned on in the global configuration of the administration and its value is set to maximum, this message does not point to a specific .php file and its specific line, like the previous errors, which I have already solved!
I also thought that the problem might be with the overwrites in the template's html folder, but I renamed mod_k2_content etc. in the content of the html folder. overrides to --mod_k2_content and the error still exists!
But I could actually delete these overwrites in this case.
It's not a solution.
What can be the solution?
Thank you in advance for your quick reply and solution!
Sincerely, Robert

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

More
4 months 1 day ago #181376 by JoomlaWorks
Replied by JoomlaWorks on topic RadioWave Template For J4!
You now need to find what's changed in the Joomla API between version 3 and 4/5. Cause that's what it boils down to.

I would recommend using something like ChatGPT, Google Bard or Phind to make the process easier.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 3 weeks ago #181392 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
I have already rewritten the administration interface in the Radio Wave Template. It works!
I use Chat gpt and it really helps a lot, although one would expect more from the support team of a paid template than to use Chat GPT.
The Frontend, on the other hand, gives the following message, which is as follows:
Path cannot be empty
The system debugging does not tell you where there is an empty path call or anything.
I've already looked through the php sources of the template, but so far I can't find the wrong line.
What do you think?
How to get Joomla4 to print the error for this error message?
Or at least, which file should I look for the error in?
The server's error.log doesn't write a specific error either, so I'm completely stuck at work and I don't know how to proceed.
Idea?
I look forward to your reply as soon as possible and thank you in advance for your help!
And while I'm writing, I wish all forum members and Joomla Works users a happy New Year!

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

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 3 weeks ago #181393 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
Hello!
I got this far with converting RadioWave to Joomla4.
The template works well on the admin interface.
However, referring to the path, the Joomla page is still not displayed by the template, as I wrote in my previous message.
You can download my modifications so far here:
hirdetnijo.eu/lrt/radiowave.zip
Please help to fix the error!
Thanks in advance for your help!
Best Regards.: Robert

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

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 3 weeks ago #181394 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
Hi Fotis,
Hello dear Joomla Works members!
I'm upset that I'm not getting help on the forum.
I'm disappointed with Joomla Works because they don't provide proper Joomla Template support for the Radio Wave template.
Of course, when you have to collect the money for it, then you are a good person.
But if we have to work, then we are already ignored.
I feel this way, I have been suffering for weeks by rewriting this template, but there is no help, even though Joomla Works should be interested in making it compatible with Joomla4, because it would bring them money.
Fewer and fewer people use Joomla3.x and we are forced to use Joomla4.
This is a paid template and if I had to pay for it, even if the support was available for a limited time, but if it is a big change like from Joomla3 to Joomla4, Joomla5, then I will automatically allow all my subscribers access to the template, or for free because they have already paid for it, or in exchange for a token amount.
I would expect this from Joomla Works.
I would do the compatibility myself and I did it partially, but I need help and I am not getting an answer for now.
I apologize if I ramble, I don't want to ramble and I don't want to hurt the Joomla Works team, I just want them to finally realize that the subscribers are dissatisfied with the service.
Please help us to help Joomla Works to make the RadioWave J4 version available for Joomla 4 as soon as possible!
Thank you in advance for your help!
Best Regards.: Robert

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

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 3 weeks ago #181397 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
Hello!
Another day passed and still nothing!
Chat GPT doesn't know the solution either!
And I still don't get an answer from Joomla Works.:-(
Maybe I can wait for them to help in the near future?
Or is this template not a problem for anyone else?
Did I just pay for it alone?
Does anyone else want to use it under Joomla 4 or Joomla 5?
Thank you in advance for your respectful response!
Best regards.: Robert

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

  • Hollo Robert
  • Hollo Robert's Avatar Topic Author
  • Offline
  • Junior Member
More
3 months 3 weeks ago #181398 by Hollo Robert
Replied by Hollo Robert on topic RadioWave Template For J4!
I do not believe it!
I can't send the content of the helper.php file here, because there are too many links in the post and I get a reply.
I will not give up!
Since the main file of the template is index.php, and index.php calls helper.php, the error is in helper.php or in the files called by helper.php.
I will try again to send the helper.php code in parts to the forum:
Part 1:
<?php
/**
* @version 1.2.0
* @package RadioWave
* @author JoomlaWorks - www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2020 JoomlaWorks Ltd. All rights reserved.
* @license www.joomlaworks.net/license
*/

// no direct access
defined('_JEXEC') or die('Restricted access');

/* --- Add this at the very top of index.php (but right below the "defined..." line) to control the timestamp --- */
// Set a timestamp for CSS/JS files
if (isset($_GET)) {
// Timestamp for testing
// When ?nocache is appended in a URL, enforce a timestamp of up to the current second
// so the CSS and JS files are re-fetched by the browser, even behind a CDN
define('TIMESTAMP', '?t=' . date('Ymd_His'));
} else {
// Timestamp for production
define('TIMESTAMP', '?v=1.2.0');
}

/*
API Calls & Assignments
*/
$app = JFactory::getApplication();
$document = JFactory::getDocument();
$language = JFactory::getLanguage();
$user = JFactory::getUser();

$sitename = $app->getCfg('sitename');
$sitetemplate = $app->getTemplate();

$siteurl = 'hirdetnijo.eu/lrt/'; // Updated this line
$siterelpath = $this->baseurl;
$siteabspath = JPATH_SITE;
$templatePath = 'hirdetnijo.eu/lrt/templates/' . $this->template; // Updated this line

/*
Requests
*/
$option = $app->input->get('view') != 'option';
$view = $app->input->get('view') != 'view';
$layout = $app->input->get('view') != 'layout';
$page = $app->input->get('view') != 'page';
$task = $app->input->get('view') != 'task';
$id = $app->input->getInt('id');
$itemid = $app->input->getInt('Itemid');
$tmpl = $app->input->get('view') != 'tmpl';

/*
Helper Functions
*/
// Convert language strings to a JSON friendly format for the error/offline pages
if (!function_exists('nuText')) {
function nuText($str)
{
return str_replace("'", "\\'", JText::_($str));
}
}

if (!function_exists('hex2rgb')) {
function hex2rgb($hex)
{
$hex = str_replace("#", "", $hex);
if (strlen($hex) == 3) {
$r = hexdec(substr($hex, 0, 1) . substr($hex, 0, 1));
$g = hexdec(substr($hex, 1, 1) . substr($hex, 1, 1));
$b = hexdec(substr($hex, 2, 1) . substr($hex, 2, 1));
} else {
$r = hexdec(substr($hex, 0, 2));
$g = hexdec(substr($hex, 2, 2));
$b = hexdec(substr($hex, 4, 2));
}
$rgb = array($r, $g, $b);
return implode(",", $rgb);
}
}

/*
Frontpage Check
*/
$menu = $app->getMenu();
if ($menu->getActive() == $menu->getDefault()) {
$isFrontpage = true;
} else {
$isFrontpage = false;
}

/*
HTML5 Document for Joomla! 3.x
*/
if (version_compare(JVERSION, '3.0', 'ge') !== false) {
$document->setHtml5(true);
}

/*
Meta Information
*/
if (version_compare(JVERSION, '3.0', 'ge') !== false) {
$document->setMetaData('X-UA-Compatible', 'IE=edge,chrome=1', true);
$document->setMetaData('imagetoolbar', 'false', true);
} else {
$topMetaTags = '
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="imagetoolbar" content="false" />
';
}
$document->setMetaData('viewport', 'width=device-width, user-scalable=0, initial-scale=1.0');
$document->setMetaData('apple-mobile-web-app-capable', 'yes');

$document->setMetaData('distribution', $this->params->get('nutpMetaDistribution'));

$document->setMetaData('designer', $this->params->get('nutpCreditsName') . ' - ' . $this->params->get('nutpCreditsLink'));
$creditsMessage = '<a target="_blank" title="' . htmlentities($this->params->get('nutpCreditsName', 'Designed by JoomlaWorks'), ENT_QUOTES, 'utf-8') . '" href="' . $this->params->get('nutpCreditsLink', 'www.joomlaworks.net') . '">' . $this->params->get('nutpCreditsName', 'designed by JoomlaWorks') . '';

if ($this->params->get('nutpCopyrightStartYear') && $this->params->get('nutpCopyrightStartYear') < date('Y')) {
$metaCopyrightMessage = 'Copyright (c) ' . $this->params->get('nutpCopyrightStartYear') . ' - ' . date('Y') . ' ' . htmlentities($this->params->get('nutpCopyright', $sitename), ENT_QUOTES, 'utf-8');
$copyrightMessage = 'Copyright &copy; ' . $this->params->get('nutpCopyrightStartYear') . ' - ' . date('Y') . ' ' . $this->params->get('nutpCopyright', $sitename);
} else {
$metaCopyrightMessage = 'Copyright (c) ' . date('Y') . ' ' . htmlentities($this->params->get('nutpCopyright', $sitename), ENT_QUOTES, 'utf-8');
$copyrightMessage = 'Copyright &copy; ' . date('Y') . ' ' . $this->params->get('nutpCopyright', $sitename);
}
$document->setMetaData('copyright', $metaCopyrightMessage);

if ($this->params->get('nutpGoogleVerificationID')) {
$document->setMetaData('verify-v1', $this->params->get('nutpGoogleVerificationID'));
}
if ($this->params->get('nutpBingVerificationID')) {
$document->setMetaData('msvalidate.01', $this->params->get('nutpBingVerificationID'));
}

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


Powered by Kunena Forum