Magento2 – After migration product page only displays placeholder image

I have migrated from Magento 1.9 to Magento 2.3.5.

Media folder copied manually from Magento 1 to Magento 2.

Everything went well but on the product page correct didn’t display instead Placeholder image appeared.

However images displays on the category page where list of products are available but when click on product that goes to product details page where the placeholder shows.

I tried with php bin/magento catalog:images:resize, media folder permission to 777 reindex, flush Cache etc.

But no luck.

Any help will be appreciate.

Thanks

php – if get_post_meta is empty echo a placeholder or shortcode

Please help me with the following question.

I want to display an image in an additional TAB on the single product page (THIS PART WORKS ;-)). Sofar i can display the TAB and the image that has an URL on the product regular data (added field in the product adminstration. custom field = _product_tech)

BUT NOW: how can i check the custom field ? When it has no value it should display a placeholder image or better, a shortcode.

this is my code:

add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' );
        function woo_new_product_tab( $tabs ) {
        // Adds the new tab

            $tabs('desc_tab') = array(
                'title'     => __( 'Technische informatie', 'woocommerce' ),
                'priority'  => 50,
                'callback'  => 'woo_new_product_tab_content'
            );
        return $tabs;   
        }
        
function woo_new_product_tab_content()  {
            // The new tab content

            $prod_id = get_the_ID();
            echo'<a class="shutter" title="technische gegevens" href="http://wordpress.stackexchange.com/".get_post_meta($prod_id,'_product_tech',true)."http://wordpress.stackexchange.com/"><img width="750" height="100%" src="https://wordpress.stackexchange.com/".get_post_meta($prod_id,'_product_tech',true)."http://wordpress.stackexchange.com/"></a>';
        
        }

formulário – Como deixar uma imagem fixa antes do texto do placeholder

Sou novo no mundo da programação e estou fazendo um trabalho num curso de programação, e queria saber como coloco uma imagem dentro do placeholder e deixar de forma que fique fixa antes do texto, e quando eu fosse escrever o texto na página, a imagem não sumisse ou o texto ficasse por cima da imagem.
Queria fazer um formulário de contato dessa forma;

Exemplo de um formulário que quero fazer igual:
https://i.stack.imgur.com/B7Qhd.png

input fields – Accessibility – SC 1.4.4 – Placeholder text not visible when browser zoom is set to 200%

I have a question regarding SC 1.4.4 Resize Text for Placeholders for inputs. I am not for the design we currently have, but have to work a solution with whatever design I have.

The first row in the table has inputs to filter text in the table. In normal view without zoom, the complete placeholder text is visible. But when we zoom to 200%, the placeholder just shows “Filter” and the remaining text is cut off. My first question is whether this violates 1.4.4?

If so, the solution I recommended is to provide a title attribute for the input field, which is not ideal. It only satisfies people with low vision who can use a mouse to hover. But, users with motor disabilities using keyboard will still not be able to see, even though they can visually see the table and relate the column name with the input.

Is there a better way to address this issue without changing the designs? Attaching a screenshot for your reference.

Table without zoom

Table with Zoom

Angular FormControl Placeholder will not update dynamically with passed value

I hope someone can help me, I’m at a bit of a blocking point here.
I am pretty new to Angular so please excuse my mistakes.

I am trying to update my placeholder text for an input FormControl as follows:

I have the following component class:

export class EditFormComponent {

namePlaceholder:String="";

  restaurantForm = new FormGroup({
    id: new FormControl(''),
    name: new FormControl(''),
    address: new FormControl(''),
    specialities: new FormControl(''),
    details: new FormControl('')
  });

 passObjectValues(restaurant: RestaurantsPost) {
    this.restaurantForm.setValue({ id: restaurant.id, name: restaurant.name, address: restaurant.addressId });
    this.namePlaceholder=restaurant.name + "test";
    console.log(this.restaurantForm);
    console.log(this.namePlaceholder);
  }

HTML component looks like so:

<form class="container-card" (formGroup)="restaurantForm" (ngSubmit)="submit(restaurantForm)">
    <div class="form-group">
        <label style="color: white; font-weight:500;"for="name">
            Name
        </label>
        <input 
            formControlName="name"
            id="name" 
            type="text" 
            class="form-control"
            (placeholder)="namePlaceholder" // doesn't work
            placeholder="{{namePlaceholder}}"> // doesn't work 
    </div>

I assume this is happening because I do not create an instance of my EditFormComponent but I am instead calling a method from the class, and thus the value I pass are not registered at compile-time when building my form-group.

I have also tried calling a constructor, instead of calling my passObjectValues() method, but this is a challenge of its own.

My constructor is like so:

constructor(editedRestaurant:RestaurantsPost) {

    this.templateRestaurant=editedRestaurant;

My RestaurantPost Object:

@Injectable()
export class RestaurantsPost {


    id: String;
    name: String;
    addressId: String;
    specialitiesId: String;
    detailsId: String;
    bookingId: String;

    constructor(id:String,name:String,addressId:String,specialitiesId: String,detailsId: String,bookingId: String){
        this.id=id;
        this.name=name;
        this.addressId=addressId;
        this.specialitiesId=specialitiesId;
        this.detailsId=detailsId;
        this.bookingId=bookingId
    }
}

app.module.ts looks like so:

@NgModule({
  declarations: (
    AppComponent,
    RestaurantComponent,
    EditFormComponent
  ),
  imports: (
    BrowserModule,
    AppRoutingModule,
    HttpClientModule,
    NoopAnimationsModule,
    DemoMaterialModule,
    FormsModule,
    ReactiveFormsModule
  ),
  providers: (
    HttpErrorHandler,
    HttpClientModule,
    String
  ),
  bootstrap: (
    AppComponent
  )
})
export class AppModule { }

Browser throws this error :

>    main.ts:12 Error: Can't resolve all parameters for String: (?).
>     at getUndecoratedInjectableFactory (core.js:11428)
>     at injectableDefOrInjectorDefFactory (core.js:11418)
>     at providerToFactory (core.js:11461)
>     at providerToRecord (core.js:11448)
>     at R3Injector.processProvider (core.js:11346)
>     at core.js:11332
>     at core.js:4129
>     at Array.forEach (<anonymous>)
>     at deepForEach (core.js:4129)
>     at R3Injector.processInjectorType (core.js:11332)

Any ideas?

Thanks!

8 – Replace placeholder in custom block with preprocess hook

This is the first time I’m using the preprocees hook, apologies in advance.

I added a placeholder, {{user-uid}}, in a custom block body field, <a href="advisor/{{user-uid}}">Advisor Page</a></h5>.

My code is very simple, I have this hook theme.

    function boostrap_kampuster_preprocess_block(&$variables) {
        if (isset($variables('content')('#block_content'))) {
            $content = $variables('content')('#block_content');
            
            /** custom block ID is 4 **/
            if( method_exists($content,'id') && $content->id() == '4') {
    
                $body = $variables('content')('body')(0)('#text');
                
                $vars('user') = DrupaluserEntityUser::load(Drupal::currentUser()->id());
                $body=str_replace('{{user-uid}}',$vars('user'),$body);
            }
        }
    }

I am not getting any errors but the function is not doing what it is supposed to do and replace {{user-uid}} with logged in user’s ID either.

FYI, I cleared caches several times.

Change Placeholder Text on UWP App Page From Windows Template Studio

I have been trying to develop a UWP app through the use of Windows Template Studio. It is kind enough to include things like placeholder text and pre-formatted areas of an app that a developer can take advantage of. However, that placeholder text is nowhere to be found inside the XAML editor of my setup, which is Visual Studio 2019 (latest version) and the latest Windows 10 SDK compatible with Windows 10 2004. There is a <TextBlock /> inside the XAML code, but without a Text attribute. When adding the Text attribute, it doesn’t take effect when running the app, but instead resorts to some default lorem impsum text that Windows Template Studio likes to throw in text areas. I have looked through every file to try and find where that text is, but I can’t find it. Changing the image and title text of the first run dialog, for example, seems to apply just fine, but those elements are the only ones in the editor that have <Image /> tags or Text attributes attached to them beforehand. I Have tried adding a Text attribute to the XAML TextBlock, looking through Microsoft tutorials and documentation, and looking through various other forums to no avail. My XAML code for the first run dialog is as follows:

<ContentDialog
    x:Class="Yeetnite_Launcher.Views.FirstRunDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    x:Uid="FirstRunDialog"
    d:DesignHeight="345"
    d:DesignWidth="550"
    mc:Ignorable="d">
    <ContentDialog.TitleTemplate>
        <DataTemplate x:DataType="x:String">
            <StackPanel Orientation="Horizontal">
                <Image
                    Width="40"
                    Height="41"
                    Source="/Assets/favicon.png" />
                <TextBlock
                    Margin="{StaticResource SmallLeftMargin}"
                    VerticalAlignment="Center"
                    Text="Welcome to my App" />
            </StackPanel>
        </DataTemplate>
    </ContentDialog.TitleTemplate>
    <ScrollViewer>
        <StackPanel>
            <TextBlock x:Uid="FirstRun_Body" TextWrapping="WrapWholeWords" Text="this is some default text that should show up when using the first run diaog that will change if I can actually edit the text." Width="376"/>
        </StackPanel>
    </ScrollViewer>
</ContentDialog>

A rough idea of what it’s supposed to look like:
how it’s supposed to look

What it actually looks like: what it actually looks like

An edit on those images so that they are embedded would be very much appreciated.

magento2 – Placeholder Image not showing in frontend

I was using cdn for media intially but then later replaced it to pub/media/. I dont have any product images with me, hence I uploaded placeholder images from admin. The products still load from pub/media/catalog/product/cache folder. This is what I have done till now:

  1. Gave 777 permission and even changed the user for all files
  2. Flushed image cache folder from admin, also deleted pub/media/catalog/product/cache folder manually
  3. Ran bin/magento catalog:images:resize but got error that original image not found
  4. Ran setup upgrades, di compile, static content deploy, deleted generated, pub/static/ ,var/cache folders
  5. Disabled custom theme and all custom modules

The placeholder images show in admin but not on frontend. And debugging further I realised that placeholder images show for products which have no image assigned, but do not show for products which already had an image assigned but that image is no longer found. I get 404 error when I open those cache links, ideally it should show the placeholder image