"Deprecated" error migrating blog from blogger to wordpress - wordpress

I've migrated my old blog from Blogger to Wordpress. It's worked but I've received the following error:
"Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Blogger_Importer has a deprecated constructor in /home/melsiepa/public_html/wp-content/plugins/blogger-importer/blogger-importer.php on line 44"
I'm new to web so I have NO CLUE what to do / change!
This is line 44: class Blogger_Importer extends WP_Importer {
Here is the code in context:
/**
* Blogger Importer class for managing the import process of a XML
file
*
*/
if ( !class_exists( 'Blogger_Importer' ) ) {
class Blogger_Importer extends WP_Importer {
const IMPORT_IMG = true; // Should we import the images (boolean)
const LARGE_IMAGE_SIZE = '1024'; //
Please help!!

In this case you should not change anything(code-wise), the warning that you have received is informing you that the coding of that certain file is using coding for a lower php version. To not see it I would suggest to try lowering the php version that your Wordpress site is currently using and once you are done using the 'blogger-importer' plugin to disable it and change the php version to a higher one.
Would suggest to try lowering to 5.6 then to 5.4 or even 5.2 if you still see the warning*
If you encounter any issues performing the necessary steps write back and we will try to assist you.

Related

How to use Breeze in laravel package blade template

I'm playing around with my Laravel 8 install and just added breeze (v1.9.2 per laravel docs so vite doesn't break)
I figured out that I can copy the dashboard.php in resources/views/ to make a simple template with a new route. e.g. rename it foo.php, add a route to web.php
Route::get('/foo', function () {
return view('foo');
})->middleware(['auth'])->name('foo');
it works!
But when I try to do something similar in a package that publishes to resources/views/mypackage in the package's routes.php:
Route::get('/mypackage/foo', function () {
return view('mypackage.foo');
})->middleware(['auth'])->name('foo');
it bounces me back to dashboard any time I try to go to the url /mypackage/foo
How exactly can I use the authentication in a package template? I need to build an admin page into a package and need to make sure the user is signed in.

Property 'downloadURL' not found on object of type 'FIRStorageMetadata *' - Getting this error when trying to build a Flutter project

I'm trying to build a Flutter project on Xcode with firebase installed. I'm getting the following error: Property 'downloadURL' not found on object of type 'FIRStorageMetadata *'
This is being caused by the following section in the FirebaseStoragePlugin.m file:
NSString *path = call.arguments[#"path"];
NSDictionary *metadataDictionary = call.arguments[#"metadata"];
FIRStorageMetadata *metadata;
if (![metadataDictionary isEqual:[NSNull null]]) {
metadata = [self buildMetadataFromDictionary:metadataDictionary];
}
FIRStorageReference *fileRef = [[FIRStorage storage].reference child:path];
[fileRef putData:data
metadata:metadata
completion:^(FIRStorageMetadata *metadata, NSError *error) {
if (error != nil) {
result(error.flutterError);
} else {
// Metadata contains file metadata such as size,
// content-type, and download URL.
NSURL *downloadURL = metadata.downloadURL; <---------------- This line
result(downloadURL.absoluteString);
}
}];
}
Since I didn't generate this code, I don't particularly want to edit it as it should really be working out of the box. I've tried to change the method to see whether later versions of Firebase might only accept another function but to no avail. What shall I do in this situation? Should I perhaps try to rebuild the project with a higher version of Firebase or is there a one line fix?
The downloadURL was removed from the StorageMetadata class in May 2018. If your native iOS code still uses that, it's high time to find an updated SDK or update your code to match the documentation on uploading a file and getting its download URL.
If you're using the FlutterFire binding libraries, upgrade to the latest version (as I definitely don't see any reference to metadata.downloadURL in its current code base). If you're using another library, check if the latest version of that solves the problem - or otherwise consider switching to the FlutterFire libraries as those are quite actively maintained.

Cefsharp : problem with the Reqest Context of the General Usage page

I have some problems, to change user profile with cefsharp 71.0.2.
All is working good with an user1.
To change users, the General Usage Wiki page gives me the solution.
But the 3rd line of this code
var requestContextSettings = new RequestContextSettings { CachePath = cachePath2 };
browser = new ChromiumWebBrowser();
browser.RequestContext = new RequestContext(requestContextSettings, new CustomRequestContextHandler());
gives 2 errors :
impossible to convert Cefsharp.RequestContextSettings to Cefsharp.IRequestContext
CustomRequestContextHandler reference can't be found.
I used Nuget to include the package 71.0.2 targetFramework 461 to my project.
A RequestContext(requestContextSettings) constructor is working to run something, but the browser is frozen on the last page I loaded with the user1.
Some tips to fix the problem ?
I saw that a 73.1.120.pre is on GitHub, but I don't know how to manage that without some Nuget package.
Tx for your help.

BundleTransformer for less complaining "Could not find a factory, that creates an instance of the JavaScript engine"

If you upgrade from version 1 to version 2 of BundleTransformer you may get this message:
Could not find a factory, that creates an instance of the JavaScript
engine with name MsieJsEngine.
Like me, you may not even have realized you've upgraded more than just a point release.
How to fix?
Version 2 DOES NOT USE WEB.CONFIG for configuration anymore
So start by removing it and read the rest of this link
https://github.com/Taritsyn/JavaScriptEngineSwitcher/wiki/How-to-upgrade-applications-to-version-2.X
Basically you will be doing the following:
Removing existing web.config nodes for javscript engine
Adding to someplace like global.asax some initialization code
Install Nuget packages for the engines you want to use
Make sure to add a using statement to be able to use extension methods (if you choose that way)
I ended up with something like this:
using JavaScriptEngineSwitcher.Core;
using JavaScriptEngineSwitcher.Msie;
using JavaScriptEngineSwitcher.V8;
....
public class JsEngineSwitcherConfig
{
public static void Configure(JsEngineSwitcher engineSwitcher)
{
engineSwitcher.EngineFactories
.AddMsie(new MsieSettings
{
UseEcmaScript5Polyfill = true,
UseJson2Library = true
})
.AddV8();
engineSwitcher.DefaultEngineName = MsieJsEngine.EngineName;
}
}
I'm following the instructions, but my code is now breaking on BundleConfig
var cssTransformer = new StyleTransformer();
In the name attribute of /configuration/bundleTransformer/less/jsEngine configuration element not specified a name of JavaScript engine.
If you have not installed JavaScript engine, then for correct working
of this module is recommended to install one of the following NuGet
packages: * JavaScriptEngineSwitcher.Msie *
JavaScriptEngineSwitcher.V8 * JavaScriptEngineSwitcher.ChakraCore
After package is installed, need set a name of JavaScript engine (for
example, MsieJsEngine) to the name attribute of
/configuration/bundleTransformer/less/jsEngine configuration
element.

Enabling hook form alter module - not showing up in modules

Good Day,
I am doing a hook_form_alter and followed a tutorial where you create a directory in your /sites/all/modules directory and place the module.info and mymodule.module files within. I've called that directory mymodule so the path will be /sites/all/modules/mymodule.
The problem I'm having is trying to enable the module. It does not show up in the list of Modules when I check. It's clearly in my directory.
My module (my_module.module) looks like this and is going to be used to modify the form where you add the product (basically taking out the SKU, list price and commission):
<?php
// $Id$
/**
* #file
* Module to hold my customizations to Ubercart
*/
/**
* Implementation of hook_form_alter()
*/
function my_module_form_alter($form_id, &$form) {
if ($form_id == 'product_node_form') {
$form['base']['model']['#required'] = FALSE;
$form['base']['prices']['list_price']['#required'] = FALSE;
$form['base']['prices']['cost']['#required'] = FALSE;
$form['base']['prices']['sell_price']['#required'] = FALSE;
$form['base']['prices']['shippable']['#required'] = FALSE;
}
}
And the info file, my_module.info, looks like this:
; $Id$
name = My module
description = My customizations to Ubercart
package = Custom
core = 7.x
Why would it not show up in the modules list and how do I make Drupal see the module so I can enable it?
I don't have a category called Custom and nothing is showing up.
So far, i've gone into my php.ini file and put in safe_mode=off to see if that would help (because someone said this sometimes causes Drupal to ignore new modules for some reason) but that didn't help.
I created both files on the server so I don't think there would be any issues with something like linefeeds (I use GoDaddy's FTP File Manager and it comes with an editor.)
What could the problem be because I'm stumped?
Thanks for looking.
Make sure to name the .info and .module files with the same name.
E.g. mymodule.info and mymodule.module.
Note that, the name should be alpha-numeric (underscore is allowed) and starts with a letter.
In your hook implementation, replace the word hook with your module's name
function mymodule_form_alter($form, &$form_state, $form_id)
{
// code goes here...
}
I discovered something that works. After reading about people having issues with linefeeds and not knowing if this was creating the problem, I decided to try something.
I went to a module directory and found a .info file. In my case, I went to a directory that had Commerce in it and copied the Commerce.info file to my custom module's directory.
Then, what I did was take out the stuff that Drupal added after it installed the Commerce module (you can do the same for whatever .info file you copy from) and modified the information at the start, removing any dependency lines or anything that doesn't matter. In other words, make it like the .info file you are trying to use but DON'T COPY from the .info you've been trying to enable!
Save it this file (in my case, it's still commerce.info.)
Now delete the .info file you were trying to enable originally.
Rename the new .info file to the name you wanted (commerce.info => mymodule.info.)
Go to your Modules page and refresh it.
Voila...there it is. Enable and save configuration.

Resources