WordPress database error: [Can't create/write to file '/tmp/#sql-temptable-2532-297b57f-4f.MAI' (Errcode: 28 "No space left on device")]
SELECT p.*, o.option_value, GROUP_CONCAT(DISTINCT CONCAT(m.meta_key, "::", m.meta_value) separator "::::") as seo_meta, t.slug, tr.language_code as language FROM wp_posts p JOIN wp_postmeta m ON p.ID = m.post_id JOIN wp_options o ON o.option_name = "siteurl" JOIN wp_term_relationships r ON r.object_id = p.ID JOIN wp_term_taxonomy x ON x.term_taxonomy_id = r.term_taxonomy_id JOIN wp_terms t ON t.term_id = x.term_id JOIN wp_icl_translations tr ON p.ID = tr.element_id WHERE post_type = "page" AND post_status = "publish" AND tr.language_code = 'en' AND t.slug IN ('jquery') AND x.taxonomy = "page_cat" AND tr.element_type = "post_page" AND meta_key IN ("_yoast_wpseo_title", "_yoast_wpseo_metadesc") GROUP BY p.ID

WordPress database error: [Can't create/write to file '/tmp/#sql-temptable-2532-297b57f-50.MAI' (Errcode: 28 "No space left on device")]
SHOW FULL COLUMNS FROM `wp_options`

MDB Datatables not working right with React App?

WordPress database error: [Can't create/write to file '/tmp/#sql-temptable-2532-297b57f-51.MAI' (Errcode: 28 "No space left on device")]
SELECT p.* FROM wp_mdb_forum_posts AS p LEFT JOIN wp_mdb_forum_posts AS q ON( q.Id = p.ParentId AND p.Id = q.AcceptedAnswerId ) WHERE p.PostTypeId = 2 AND p.ParentId = 109485 GROUP BY p.Id ORDER BY CASE WHEN q.Id IS NOT NULL THEN 1 ELSE 0 END DESC, p.UpvoteCount DESC, p.CreationDate ASC


Topic: MDB Datatables not working right with React App?

Alexander Joseph asked 5 years ago

I need to use the first column data as a link that takes you to a page for that specific entry/document, however when I use the<Link> tag around the variable in the tableRows array the search no longer works for that field (see screenshot), search still works for every other field. Is there a workaround for this or should I be doing this another way? I also tried just using the <a> tag but the same thing happens

Also for some reason I can sort ascending by clicking on the but it wont sort descending for some reason when i click again

Resources (screenshots, code snippets etc.)enter image description here

enter image description here

And here is my component...

import React, { Fragment, useEffect } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { getEntries } from '../../actions/journal';
import Spinner from '../layout/Spinner';
import { MDBDataTableV5 } from 'mdbreact';
import Moment from 'react-moment';

const Journal = ({ getEntries, journal: { entries, loading } }) => {
    useEffect(() => {
        getEntries();
    }, [getEntries]);

    const tableRows = [];

    entries.map((journal) => {
        tableRows.push({
            name: <Link to='#'>{journal.cigarName}</Link>,
            brand: journal.brand,
            rating: journal.rating,
            origin: journal.origin,
            date: <Moment format='MM/DD/YYYY'>{journal.date}</Moment>,
        });
    });

    const data = {
        columns: [
            {
                label: 'Name',
                field: 'name',
                width: 150,
            },
            {
                label: 'Brand',
                field: 'brand',
                width: 270,
            },
            {
                label: 'Rating',
                field: 'rating',
                width: 200,
            },
            {
                label: 'Origin',
                field: 'origin',
                width: 100,
            },
            {
                label: 'Date',
                field: 'date',
                sort: 'disabled',
                width: 150,
            },
        ],
        rows: tableRows,
    };

    return loading ? (
        <Spinner />
    ) : (
        <Fragment>
            <div className='container top-space'>
                <h1 className='large text-primary'>Journal</h1>
                <MDBDataTableV5
                    hover
                    entriesOptions={[5, 20, 25]}
                    entries={5}
                    pagesAmount={4}
                    data={data}
                />
                ;
            </div>
        </Fragment>
    );
};

Journal.propTypes = {
    getEntries: PropTypes.func.isRequired,
    journal: PropTypes.object.isRequired,
};

const mapStateToProps = (state) => ({
    journal: state.journal,
});

export default connect(mapStateToProps, { getEntries })(Journal);

Piotr Glejzer staff commented 5 years ago

did you try use the older version of datatable? I think there can be some bugs about that in the latest version.


Alexander Joseph commented 5 years ago

Is there a reference on how to install and use an older version?


Piotr Glejzer staff commented 5 years ago

This is almost the same component with new features without V5. Did you see it?

https://mdbootstrap.com/docs/react/tables/datatables-1/


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Open

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.27.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No