Wordpress: 404 Error on Website when Loading Table

Wordpress: 404 Error on Website when Loading Table

davidjmorindavidjmorin Posts: 101Questions: 31Answers: 0
edited July 2021 in Editor

Hey all,
I read the blog post on installing the tables on a wordpress site. I must have missed something because I am not able to get this working. It keeps putting my table.example.php file after the Dir of my page.

https://mysiteurl.com/sku-requests-2/php/table.sku_request.php?_=1625800213416

My Editor files are at the root of my website so I added to the header this

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/jqc-1.12.4/moment-2.18.1/dt-1.10.25/b-1.7.1/b-colvis-1.7.1/b-html5-1.7.1/date-1.1.0/r-2.2.9/sc-2.0.4/sb-1.1.0/sp-1.3.0/sl-1.3.3/datatables.min.css">
<link rel="stylesheet" type="text/css" href="/Editor/css/generator-base.css">
<link rel="stylesheet" type="text/css" href="/Editor/css/editor.dataTables.min.css">
<script type="text/javascript" charset="utf-8" src="https://cdn.datatables.net/v/dt/jqc-1.12.4/moment-2.18.1/dt-1.10.25/b-1.7.1/b-colvis-1.7.1/b-html5-1.7.1/date-1.1.0/r-2.2.9/sc-2.0.4/sb-1.1.0/sp-1.3.0/sl-1.3.3/datatables.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/Editor/js/dataTables.editor.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/Editor/js/table.sku_request.js"></script>

Also in my JS file I added the full web url to the php file

$(document).ready(function() {
    var editor = new $.fn.dataTable.Editor( {
        ajax: 'https://mysiteurl.com/Editor/php/table.sku_request.php',
        table: '#sku_request',
        fields: [

If i visit that URL it pulls the data just fine and I can see it is formatted correctly, but when I go to the page with the table i get the error popup

I can PM my live website for the example.

Maybe someone knows the best practice for where to place the core files?

var/www/html/wordpress/Editor?
var/www/html/wordpress/wp_content/themes/themename/Editor?

This question has an accepted answers - jump to answer

Answers

  • davidjmorindavidjmorin Posts: 101Questions: 31Answers: 0

    my folder structure.

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Have you followed the steps in the technical notes linked to in the error? That'll be the place to start. I tried to load your page but it's giving "ERR_CONNECTION_CLOSED".

    Colin

  • davidjmorindavidjmorin Posts: 101Questions: 31Answers: 0

    @colin I just PMd you

  • davidjmorindavidjmorin Posts: 101Questions: 31Answers: 0

    This seems to have resolved itself without any changes to the code. Cached issue most likely.

  • colincolin Posts: 15,112Questions: 1Answers: 2,583
    Answer ✓

    Tops, easy ones are the best!

    Colin

Sign In or Register to comment.