Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter pejca

    (@pejca)

    I deactivated all the plugins and it’s still not working.

    Thread Starter pejca

    (@pejca)

    Just reinstalled and deleted the folder via terminal (again) and i clicked on the button: https://ibb.co/bFXkxnW

    • This reply was modified 7 months ago by pejca.
    Thread Starter pejca

    (@pejca)

    I just made it kind of work…

    I go to my home page of the website and on the top of the page i see “Collections #Custom Elementor Page Maker” (or something similar). I go to delete the plugin and it says it’s deleted. I go to my FTP terminal and I see the folder is still there so I delete it. I go back to browser and go to my tab where plugin is loaded and still not refreshed(https://ibb.co/8MqvHYQ). For some reason I click on the upload image button and… it works? I refresh the page and obviously it says the page doesn’t exist. Now I upload it again and again it isn’t working.

    Thread Starter pejca

    (@pejca)

    Well, it looks like it wasn’t ‘some unimportant code’. I added you knew button next to my old button (<button class="button" id="upload_image_button">Upload Image</button>) and your does nothing somehow. I changed the theme to default and it’s the same.

    Thread Starter pejca

    (@pejca)

    I tried to replace wp_enqueue_media() and it stopped my site from working. Something about fatal error. After I activated my backup from few days ago I try it again and it didnt let me activate the plugin.

    Plugin could not be activated because it triggered a?fatal error.

    So i take it as I wasn’t supposed to do that.

    Thread Starter pejca

    (@pejca)

    function load_media_files() {

    ? ? wp_enqueue_media();

    }

    add_action( 'admin_enqueue_scripts', 'load_media_files' );

    function cep_create_menu() {

    ? ? add_menu_page('Create Collection', 'Create Collection', 'manage_options', 'create-collection', 'cep_create_collection_page');

    }

    add_action('admin_menu', 'cep_create_menu');

    function cep_create_collection_page() {

    ? ? ?>

    ? ? <div class="wrap">

    ? ? ?some unimportant code...

    ? ? </div>

    ? ? <?php

    ? ? if (isset($_POST['submit'])) {

    ? ? ? ? cep_create_elementor_page($_POST['name'], $_POST['tag_slug'], $_POST['image']);

    ? ? }

    }

    function cep_create_elementor_page($name, $tag_slug, $image) {

    ? ? $page_id = wp_insert_post(array(

    ? ? ? ? 'post_title' => $name,

    ? ? ? ? 'post_content' => '[products tag="' . esc_attr($tag_slug) . '"]',

    ? ? ? ? 'post_status' => 'publish',

    ? ? ? ? 'post_type' => 'page',

    ? ? ));

    ? ? if ($page_id) {

    ? ? ? ? update_post_meta($page_id, '_elementor_data', json_encode(array(

    ? ? ? ? ? ? 'version' => '3.0.0',

    ? ? ? ? ? ? 'elements' => array(

    ? ? ? ? ? ? ? ? array(

    ? ? ? ? ? ? ? ? ? ? 'id' => 'image',

    ? ? ? ? ? ? ? ? ? ? 'elType' => 'widget',

    ? ? ? ? ? ? ? ? ? ? 'widgetType' => 'image',

    ? ? ? ? ? ? ? ? ? ? 'settings' => array(

    ? ? ? ? ? ? ? ? ? ? ? ? 'image' => $image,

    ? ? ? ? ? ? ? ? ? ? ? ? 'image_size' => 'full',

    ? ? ? ? ? ? ? ? ? ? ? ? 'width' => '1200',

    ? ? ? ? ? ? ? ? ? ? ? ? 'height' => '540',

    ? ? ? ? ? ? ? ? ? ? ),

    ? ? ? ? ? ? ? ? ),

    ? ? ? ? ? ? ? ? array(

    ? ? ? ? ? ? ? ? ? ? 'id' => 'spacer',

    ? ? ? ? ? ? ? ? ? ? 'elType' => 'widget',

    ? ? ? ? ? ? ? ? ? ? 'widgetType' => 'spacer',

    ? ? ? ? ? ? ? ? ? ? 'settings' => array(

    ? ? ? ? ? ? ? ? ? ? ? ? 'height' => '50',

    ? ? ? ? ? ? ? ? ? ? ),

    ? ? ? ? ? ? ? ? ),

    ? ? ? ? ? ? ),

    ? ? ? ? )));

    ? ? }

    }

    function cep_enqueue_media() {

    ? ? wp_enqueue_media();

    ? ? wp_enqueue_script('cep-media-upload', plugin_dir_url(__FILE__) . 'media-upload.js', array('jquery'));

    }

    add_action('admin_enqueue_scripts', 'cep_enqueue_media');

    This is almost full php file.

    So Im not sure what do i do with wp_enqueue_media( array $args = array() ) , do i just replace that with already existing wp_enqueue_media() ? (I’m probably being dump right now, sorry)

    Thread Starter pejca

    (@pejca)

    I used diffrent AI tool and it helped me lol

    • This reply was modified 7 months ago by pejca.
    Thread Starter pejca

    (@pejca)

    I know AI isn’t really that great at coding, but I thought it was gonna work because it’s nothing complicated. Anyways, I’ve tried to look for the errors, but there are none. I went to browser console and there were 4 errors (before I clicked it) and when I click nothing changes.

    Thread Starter pejca

    (@pejca)

    Here is the website if you need more details because i don’t quite understand you https://37.220.78.72:65400/

    This only happens on search page. Every other page where there are products shown, its normal.

    I didn’t change themes from the creation of the website. I downloaded the plugin you suggested and it didn’t help.

    Thanks for answer anyway!

    Thread Starter pejca

    (@pejca)

    I’m currently away from home so I’ll try when I get home but are you sure I can do that cuz there is no user interface on my linux server?

    Thread Starter pejca

    (@pejca)

    Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)