Magento Media Browser Not Appearing - magento

Did an upgrade from 1.5 to 1.6 and now the media browser is not appearing. When I go to a product and try to add some images in the wysiwyg I get the following message when I try to bring it up:
The log reports:
ERR (3): Warning: Missing argument 1 for Mage_Page_Block_Html_Head::addJs() in /var/www/domain.net/app/code/core/Mage/Page/Block/Html/Head.php on line 66
(3): Notice: Undefined variable: name in /var/www/domain.com/app/code/core/Mage/Page/Block/Html/Head.php on line 68
Firebug reports:
"NetworkError: 404 Not Found - http://www.domain.net/skin/m/1346486879/js/mage/adminhtml/variables.js,/js/mage/adminhtml/wysiwyg/widget.js,/js/lib/flex.js,/js/lib/FABridge.js,/js/mage/adminhtml/flexuploader.js,/js/mage/adminhtml/browser.js,/js/"
I checked all the JS files and they all load. The item /js/ at the end appears to be the problem. Looking in the layout main.xml it appears that it might be /js/prototype/window.js
I tried calling /js/prototype/window.js in the template head which did not work. The log error is for a method that adds the JavaScript to the page.
Here is the code that the log is giving errors messages to:
/**
* Add JavaScript file to HEAD entity
*
* #param string $name
* #param string $params
* #return Mage_Page_Block_Html_Head
*/
public function addJs($name, $params = "")
{
$this->addItem('js', $name, $params);
return $this;
}

I finally tracked down the module that was the root of the issue. I saw this issue with custom modules so I figured some module was causing this.
First I turned off all my modules with this command:
find . -name "*.xml" -print | xargs sed -i 's/true/false/g'
Then I tracked it down to: Fooman Speedster
Hope this helps someone else who runs into this issue.

Related

Error when i try to create livewire component

I've installed laravel livewire on a Laravel 8 project, ad when i run the command php artisan make:livewire table the terminal shows this error:
ArgumentCountError
Too few arguments to function Illuminate\Support\Str::finish(), 1 passed in /Applications/MAMP/htdocs/cuoreLaravel/vendor/livewire/livewire/src/helpers.php on line 12 and exactly 2 expected
at vendor/laravel/framework/src/Illuminate/Support/Str.php:235
231▕ * #param string $value
232▕ * #param string $cap
233▕ * #return string
234▕ */
➜ 235▕ public static function finish($value, $cap)
236▕ {
237▕ $quoted = preg_quote($cap, '/');
238▕
239▕ return preg_replace('/(?:'.$quoted.')+$/u', '', $value).$cap;
+17 vendor frames
18 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
I've followed all the documentation installation steps, but I don't understand what the problem is.
I hope someone can help me :-) thanks
This happened to me after a fresh install of Livewire. Running php artisan optimize fixed it in my case. I have not found the exact reason, but I suspect some of the Livewire config needed to be included in the config cache first.
So either optimize, or clear the cached config completely.

TCPDF ERROR joomla virtuemart does not create the invoice

I use joomla 3.9.6, virtuemart 3.4.2, and tcpdf 1.0.7
When i try to view the invoice(pdf) or when i change order status to confirmed i get the TCPDF ERROR: Unable to create output file: \vmorders\invoices\invoice_190522TIXG01.pdf
i already have created the folders vmorders\invoices and gave it the proper permissions. (the site runs locally with wamp)
Php Error log
[22-May-2019 16:11:21 UTC] PHP Warning: fopen(): remote host file access not supported, file://\vmorders\invoices\invoice_190522TIXG01.pdf in C:\wamp64\www\byzantinemusic\libraries\vendor\tecnickcom\tcpdf\include\tcpdf_static.php on line 1854
I think i have found the solution. Edit "libraries\vendor\tecnickcom\tcpdf\include\tcpdf_static.php". At line 1850 remove code
$filename = 'file://'.$filename;
and substitute with this
$absPath = getcwd();
$filename = str_replace("\\administrator","",$absPath) .$filename;
For Virtuemart 3.6.10:
Edit "libraries\vendor\tecnickcom\tcpdf\include\tcpdf_static.php".
At line 1817 remove code:
$filename = 'file://'.$filename;
and replace with:
$filename = $filename;
$absPath = getcwd();
$filename = str_replace("\\administrator","",$absPath)."/".$filename;

Laravel adds mysql in file path

I am facing a weird issue with Laravel 5.5. I am working on my local xampp server and trying to execute LOAD DATA INFILE query in controller function. But I am getting error PDOException (HY000)
SQLSTATE[HY000]: General error: 29 File 'D:\xampp\mysql\data\uploads\RDMST.csv' not found (Errcode: 2 "No such file or directory")
Currently my csv file is located at public/uploads folder. I tried various path settings for filename like
$fileCsv = 'uploads/RDMST.csv';
$fileCsv = public_path().'/uploads/RDMST.csv';
But I am getting same error and please notice the error path shows mysql\data in path. I am not getting from where it is appending this two folders in path. When I echo public path , it displays this:
D:\xampp\htdocs\tax\public
So, can you please help how to use path for load file without appending this "mysql\data" in path?
Any help is greatly appreciated.
Here is my complete controller function:
public function getCsv()
{
//echo public_path(); die;
//$fileCsv = public_path().'/uploads/RDMST.csv';
$fileCsv = 'uploads/RDMST.csv';
echo $query = "LOAD DATA INFILE '".$fileCsv."'
REPLACE
INTO TABLE tblreception
(year,
reception_number,
file_date,
file_time,
instrument_type,
#created_at,
#updated_at)
SET created_at=NOW(),updated_at=null";
DB::connection()->getPdo()->exec($query);
//return view('reception');
}
Can we not use csv file path?
Thanks

tcpdf with laravel 5

i want to save the output pdf file to public folder my method is
public function qrSVG()
{
$qrCodes = ['4659284fff','465928447','465928447','613271980','484016586','aaaaabbbbbccccc'];
$id = ['201596400-1','201596400-2','201596400-3','831070646','493130428','aaaaabbbb'];
PDF::SetTitle('qrcodes\test');
$i=0;
foreach(array_chunk($qrCodes, 2) as $qrCodee)
{
PDF::AddPage();
$m = 55;
$n = 30;
foreach($qrCodee as $qr)
{
QrCode::size(400);
QrCode::margin(3);
QrCode::errorCorrection('H');
QrCode::encoding('UTF-8');
QrCode::backgroundColor(255,255,255);
QrCode::color(0,0,0);
QrCode::imageTitle($id[$i]);
$svg = QrCode::generate($qr);
PDF::ImageSVG('#'.$svg, $x=$m, $y=$n, $w='100', $h='100', $link='', $align='', $palign='', $border=1, $fitonpage=false);
$i++;
$n = 150;
}
}
ob_clean();
PDF::Output('qrcodes\test.pdf');}
this code generate and open the file put don't save it when i replace the last line in my code with PDF::Output('qrcodes\test.pdf', 'F');
when i put any option with PDF::Output there is an error with F and D options the error when use F is
ErrorException in tcpdf_static.php line 2440:
fopen(): remote host file access not supported, file://qrcodes\test.pdf
and when i replace the last line with
PDF::Output($_SERVER['DOCUMENT_ROOT'] . 'qrcodes\test.pdf', 'F');
the error is
ErrorException in tcpdf.php line 2793:
Undefined property: Elibyy\TCPDF\Pdf::$h
The main reason you're getting the error about remote host file access not supported is because you need to provide the full path in the file name that you provide to the Output() method. Yeah, it's a bit annoying and it catches me out all the time!
I can't comment on the second error you're getting because I cannot get your code to run (missing methods in QrCode class). What version are you using? Also, why are you trying to create an SVG for the QR code and then adding that to the PDF? Instead of taking that approach, I would highly recommend following the approach illustrated in this example:
https://github.com/tecnickcom/TCPDF/blob/master/examples/example_050.php
As you will see in the example, you should create an instance of the TCPDF class and then work with that instance, rather than calling the static methods.

XML Parsing Error : AJAX Chat

I am just trying to plant AJAX Chat for my website users. I have successfully completed the installation process with database configuration. But when I am trying to brows the domain.com/ajaxchat/index.php its returning this error given below:
XML Parsing Error: junk after document element Location: http://futurenext.esy.es/inc/chat/ Line Number 2, Column 1:
I think that the problem is in AJAXChatTemplate.php , and here the code is:
function getContent() {
if(!$this->_content) {
$this->_content = AJAXChatFileSystem::getFileContents($this->_templateFile);
}
return $this->_content;
And the error message is like:
" Non-static method AJAXChatFileSystem::getFileContents() should not be called statically, assuming $this from incompatible context in line 37"
Now please any one can help me to fix the problem. What is the problem here I can't really understand. Thanks.

Resources