magento2.3.4 – PHP fatal error: Error not detected: Call to a member function getAggregations ()

I receive the following error when I try to open the search results page.

I tried to debug this error a lot but I didn't get any clues.

PHP Fatal error:  Uncaught Error: Call to a member function getAggregations() on null in vendor/magento/module-catalog-search/Model/ResourceModel/Fulltext/Collection.php:645nStack trace:n#0 vendor/magento/framework/Interception/Interceptor.php(58): Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection->getFacetedData('category')n#1 vendor/magento/framework/Interception/Interceptor.php(138): Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection\Interceptor->___callParent('getFacetedData', Array)n#2 vendor/magento/framework/Interception/Interceptor.php(153): Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection\Interceptor->Magento\Framework\Interception\{closure}('category')n#3 generated/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection/Interceptor.php(26): Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection\Interceptor- in vendor/magento/module-catalog-search/Model/ResourceModel/Fulltext/Collection.php on line 645,

If someone is calling Whatsap and is shown on another call, I am not yet making a call or busy on a call

The incoming call deapps is shown busy on another call … but I am not making any calls … or busy on another call, answer the question is urgent

class – Can php call a static alias?

In php, is it possible for a method in a primary class to use an alias in a secondary class from an instance of the secondary class?

Class for parents:

class ParentClass
{
    public function getNewFoo()
    {
        return new Foo();
    }
}

Kind of child:

use MyCustomPathToFoo;

class ChildClass extends ParentClass
{

}

Code:

$child = new ChildClass();
return $child->getNewFoo();

I would like this code to return a new instance of MyCustomPathToFoo() instead of a new instance of Foo().

I realize that I can store the desired path to Foo in a class property, or I can simply instantiate the desired Foo in the secondary class. However, both seem redundant considering that the route is already stored in the use statement in the secondary class.

How to make the frontend ajax call as simple as possible from an add-in?

I'm trying to make this as simple as possible just to understand the basics, but I'm still getting a 400 error and an answer 0 from admin-ajax.php. I just want to hit ajax with some data. Here is my js:

jQuery(document).ready(function($) {
  $('body').click(function(e){
      $.ajax({
          action: 'the_ajax_hook',
          data: 'field=data',
          type: 'post',
          url: the_ajax_script.ajaxurl,
          success: function(response_from_the_action_function) {
              $("#site-content").html(response_from_the_action_function);
          }
      });
  });
});

And here is my complement:

function load_my_scripts(){
     wp_enqueue_script( 'my-ajax-handle', plugin_dir_url( __FILE__ ) . 'ajax.js', array( 'jquery' ) );
     wp_localize_script( 'my-ajax-handle', 'the_ajax_script', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );
}

add_action( 'wp_enqueue_scripts', 'load_my_scripts' );
add_action( 'wp_ajax_the_ajax_hook', 'the_action_function' );
add_action( 'wp_ajax_nopriv_the_ajax_hook', 'the_action_function' ); 

function the_action_function(){
  echo "field is " . $_POST('field');
  die();
}

The location seems to work because it reaches the correct URL for admin_ajax, but it is an incorrect request and does not return anything.

I know I'm missing something obvious, but that's what happens with the obvious mistakes, they don't seem obvious until someone else shows it to you. What am i missing?

Applications: Call multiple API requests with a recycler view

So I am developing a weather application that allows the user to add cities (stored in the db room) and these are displayed in a recycler view that also shows all the additional information obtained with the API based on each city entry at the base of data. I have a repository for live data that I want to return for each API call:

public MutableLiveData getWeather (int zip, String apiKey){
    MutableLiveData weatherResponse = new MutableLiveData<>();

    weatherApi.getWeatherWithZip(zip, apiKey).enqueue(new Callback() {
        @Override
        public void onResponse(Call call, Response response) {
            if(response.isSuccessful()){
                weatherResponse.setValue(response.body());
            }
        }
        @Override
        public void onFailure(Call call, Throwable t) {
            weatherResponse.setValue(null);
        }
    });
    return weatherResponse;
}

Now the question is, how can I call this method? where? Here is my main activity:
Public class MainActivity extends AppCompatActivity implements AddCityDialog.AddCityDialogListener {

private static final String TAG = "MainActivity";

//Widgets
private Button mAddNewCity;

private RecyclerView mRecyclerView;
private WeatherRecyclerAdapter mRecyclerAdapter;

private ViewAddDeleteCitiesViewModel mViewDeleteViewModel;
private ViewAddDeleteCitiesViewModelFactory mViewDeleteMyCitiesViewModelFactory;


@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    initWidgets();
    initViewModel();
    initRecyclerView();
    setupListeners();
}

public void initWidgets() {
    mAddNewCity = findViewById(R.id.btn_add_new_city);
}

public void initViewModel() {
    mViewDeleteMyCitiesViewModelFactory = new ViewAddDeleteCitiesViewModelFactory(this.getApplication());
    mViewDeleteViewModel = new ViewModelProvider(this, mViewDeleteMyCitiesViewModelFactory).get(ViewAddDeleteCitiesViewModel.class);

    mViewDeleteViewModel.getAllCities().observe(this, myCities -> mRecyclerAdapter.submitList(myCities));
}

public void setupListeners() {
    mAddNewCity.setOnClickListener(v -> addCityDialog());

    mRecyclerAdapter.setOnItemClickListener(myCity -> Toast.makeText(MainActivity.this, "Item Clicked", Toast.LENGTH_SHORT).show());

    new ItemTouchHelper(new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT) {
        @Override
        public boolean onMove(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, @NonNull RecyclerView.ViewHolder target) {
            return false;
        }

        @Override
        public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) {
            mViewDeleteViewModel.delete(mRecyclerAdapter.getCityAt(viewHolder.getAdapterPosition()));
            Log.d(TAG, "onSwiped: Note Deleted");
        }
    }).attachToRecyclerView(mRecyclerView);
}

public void addCityDialog() {
    AddCityDialog addCityDialog = new AddCityDialog();
    addCityDialog.show(getSupportFragmentManager(), "Add City Dialog");

}

public void initRecyclerView() {
    mRecyclerView = findViewById(R.id.recycler_view);
    mRecyclerAdapter = new WeatherRecyclerAdapter();
    mRecyclerView.setAdapter(mRecyclerAdapter);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
    Log.d(TAG, "initRecyclerView: Recycler View Initialized");
}

@Override
public void addCity(String nickname, String zip) {
    mViewDeleteViewModel.addCity(new MyCity(nickname,
            Integer.valueOf(zip),
            StringManipulation.getCurrentTimestamp()));
}

}

and my adapter:

`public class WeatherRecyclerAdapter extends ListAdapter {


    private static final String TAG = "WeatherRecyclerAdapter";
    private OnItemClickListener mListener;


    private static final DiffUtil.ItemCallback DIFF_CALLBACK = new DiffUtil.ItemCallback() {
        @Override
        public boolean areItemsTheSame(@NonNull MyCity oldItem, @NonNull MyCity newItem) {
            return oldItem.getId() == newItem.getId();
        }

        @Override
        public boolean areContentsTheSame(@NonNull MyCity oldItem, @NonNull MyCity newItem) {
            return oldItem.getZipCode() == newItem.getZipCode();
        }
    };

    public WeatherRecyclerAdapter(){
        super(DIFF_CALLBACK);
    }

    @NonNull
    @Override
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.weather_item_layout, parent, false);
        return new ViewHolder(view);
    }

    @Override
    public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
        MyCity myCity = getItem(position);
        holder.nickname.setText(myCity.getNickname());
    }

    public MyCity getCityAt(int position) {
        return getItem(position);
    }


    /*View Holder Class */
    class ViewHolder extends RecyclerView.ViewHolder {

        private TextView nickname;
        private TextView location;
        private TextView currentTemp;
        private TextView rainChances;
        private TextView humidity;
        private TextView windSpeed;
        private TextView lastUpdated;
        private ImageView weatherIcon;

        private CardView cardView;

        public ViewHolder(@NonNull View itemView) {
            super(itemView);

            nickname = itemView.findViewById(R.id.tv_nickname);
            location = itemView.findViewById(R.id.tv_city_country_zip);
            currentTemp = itemView.findViewById(R.id.tv_current_weather);
            rainChances = itemView.findViewById(R.id.tv_rain_chances);
            humidity = itemView.findViewById(R.id.tv_humidity);
            windSpeed = itemView.findViewById(R.id.tv_wind_speed);
            weatherIcon = itemView.findViewById(R.id.iv_weather);
            cardView = itemView.findViewById(R.id.card_view_layout);
            lastUpdated = itemView.findViewById(R.id.tv_last_updated);

            itemView.setOnClickListener(v -> {
                int position = getAdapterPosition();
                if(mListener != null && position != RecyclerView.NO_POSITION){
                    mListener.onItemClick(getItem(position));
                }
            });
        }
    }

    public interface OnItemClickListener {
        void onItemClick(MyCity myCity);
    }

    public void setOnItemClickListener(OnItemClickListener listener) {
        mListener = listener;
    }
}

I read that it is not a good practice to put the view model inside the adapter and make the API calls there. How can I make the API calls then? I'm a little lost right now hahaha

MATLink Parallelization: call user-defined MATLAB functions

I am trying to run parallel simulations of finite elements in Mathematica using the AceGen and AceFEM software along with a MATLAB script called from Mathematica.

I can run some of the simulations that do not require the MATLAB script in parallel using the pseudo approach below.

(*Launch multiple kernels*)
Get("AceFEM`");
kernels = ParallelEvaluate(
Get("AceFEM`Remote`");
$KernelID)

(*Solve FEM problem*)
Output=ParallelTable(
   
   {output1,output2}
   ,{problem,ListOfFEMProblems});

For problems that require the MATLAB script, I tried to modify the code to load MATLink and the MATLAB script in all cores in two different ways.

Focus 1:

(*Launch multiple kernels*)
Get("AceFEM`");
kernels = ParallelEvaluate(
Get("AceFEM`Remote`");
$KernelID)

(*Load MATLink*)
Needs("MATLink`");
OpenMATLAB();
MatlabFunction = MFunction("MatlabFunctionName", "OutputArguments" -> 2);

(*Solve FEM problem*)
Output=ParallelTable(
   {MATLABout1,MATLABout2}=MatlabFunction(Param1,Param2,Param3,Param4);
   
   {output1,output2}
   ,{problem,ListOfFEMProblems});

With the following error:

(kernel 4) Set::shape :  Lists {MATLABout1,MATLABout2} and     MATLink`MFunction(MatlabFunctionName,OutputArguments->2)(Param1,Param2,Param3,Param4) are not the same shape.

Focus 2:

(*Launch multiple kernels*)
Get("AceFEM`");
kernels = ParallelEvaluate(
Get("AceFEM`Remote`");
$KernelID)

(*Load MATLink*)
ParallelNeeds("MATLink`");
ParallelEvaluate(
   OpenMATLAB();
   MatlabFunction = MFunction("MatlabFunctionName", "OutputArguments" -> 2);
   );

(*Solve FEM problem*)
Output=ParallelTable(
   {MATLABout1,MATLABout2}=MatlabFunction(Param1,Param2,Param3,Param4);
   
   {output1,output2}
   ,{problem,ListOfFEMProblems});

With the mistakes:

(kernel 1) Global`OpenMATLAB::shdw :  Symbol OpenMATLAB appears in multiple contexts {Global`,MATLink`}; definitions in context Global` may shadow or be shadowed by other definitions.
(kernel 1) Global`MFunction::shdw :  Symbol MFunction appears in multiple contexts {Global`,MATLink`}; definitions in context Global` may shadow or be shadowed by other definitions.

Appears for each of the 4 kernals. As well as what happened previously Set::shape error.

(For clarity, calling the MATLAB function works perfectly for non-parallel problems)

What is the correct approach to MATLink parallelization?

Call 112 (emergency) but no record in the call log?

Last week I called 112 for an emergency. Later I saw that this call was not registered. In the past these calls were recorded. Any idea why this happens?

Call the native code from the Unity iOS build error

I created NativeCallProxy.cs in Unity

    public class NativeCallProxy: MonoBehaviour
    {
        (DllImport("__Internal"))
        public static extern void iOSUnloadUnityGame();

        public static void UnloadUnityGame()
        {
#if UNITY_IPHONE
            // Now we check that it's actually an iOS device/simulator, not the Unity Player. You only get plugins on the actual device or iOS Simulator.
            if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                iOSUnloadUnityGame();
            }
#endif
        }
    }

and created two files in Assets / Plugin / iOS
NativeCallProxy.m

#import 
#import "NativeCallProxy.h"

@implementation UnityBridgeAPI
id api = NULL;
+ (void) registerAPIForNativeCalls:(id)proxy {
    api = proxy;
}
@end

Y NativeCallProxy.h

#ifndef NativeCallProxy_h
#define NativeCallProxy_h

@protocol UnityBridgeNativeCallsProtocol
@required
- (void)unloadUnityGame;
@end

__attribute__((visibility("default")))
@interface UnityBridgeAPI: NSObject
+ (void) registerAPIForNativeCalls:(id)proxy;
@end


#endif /* NativeCallProxy_h */

and when I try to compile the exported project I get an error in Xcode.

enter the description of the image here

How can I solve it?

You cannot call a method in a null value expression

We have a Powers-hell script running in our SP 2007 environment and what it does is collect attachments from the SharePoint list and move the folder path. However, since last month I receive an error message attached. Nothing has changed and I am not sure why the error appears.

enter the description of the image here

regards

dnd 5e – Can you train / call a Blink Dog? If so, how?

In my role-playing game, I am an elven druid who received the gift of a relative of Blink Dog and I am trying to find the owner of the relative (a magician) and the dog follows me but I do not see him. I have tried to call him as my teacher has done (using his favorite toy) but he has not yet tried to collect it as he had before. How else should I resort to this creature / is it possible to start training it to follow my example instead of its original owner? Someone please explain and thank you!