Having Issues with Laravel blade & render() datatables css gone if used with these two
Having Issues with Laravel blade & render() datatables css gone if used with these two
salil93
Posts: 12Questions: 2Answers: 0
I am Working on project build with php Laravel for some reasons i cant get my laravel table to run properlly,So We have used datatables insteed but we are having issues with render() if i remove render() my css of all table is gone including search box paggination etc but if i let it on my page its getting issues with laravell footer calling the footer is hidden....Is thier any issues with the blade view & render view...Plz Suggest any solution...Thank you in advance
This discussion has been closed.
Answers
We'd need a link to the page showing the issue, so it can be debugged, as noted in the forum rules.
Thanks,
Allan
Sorry I m New to it so didnt know the rules....Here's my Code plz check it as i cant find the error...here if i remove or change the possition of render it removes the css of the datatables but in that case i can see my footer & if i dont change or remove render() my footer and other funtions are not working ..plz suggest any solution
My Code:-
Code http://www.drramjasshospital.com/testcheck.txt
Check the issue http://drramjasshospital.com/showeventstopatient
The second links shows a DataTable with, what appears to be, correct styling. Is that what you expect? Can you also link to another page, one which shows the error, so it can be debugged. The page with the styling will be a useful reference page to see what the difference is.
Allan
Hello Alan Thanks for replying...yes i want the same format ie Search box, Pagination and the same table css like on the above page....
U can visit my site where i have used it http://www.drramjasshospital.com
Login with my id -
tester21893@gmail.com
Pass - 123456
Here U can see that
On page
EVENTS IN NAVBAR - VEIW EVENTS & EVENTS REGISTRATION
i have used datatables ie they are using rendor in the code below footer thats why i am not able to view footer on these pages
But where i havent used datatables like on these pages HOME & APPOINTMENT TABS IN NAVBAR ,APPOINTMENT TAB - BOOK AN APPOINTMENT i can see my footer i have read about it about having issues of render() & laravel blade veiw i am removing the render from page Appointment (after u r logged in) select the option in
APPOINMENT TAB - APP STATUS
here on this page i have removed & replaced the render below @footer now its showing my footer but css of datatables like search box & pagination has gone
You can the error on that page - 1
FatalErrorException in f7a05becebea6a8abeddd34ebdd886059d5470d7.php line 96:
Call to a member function render() on a non-object
in f7a05becebea6a8abeddd34ebdd886059d5470d7.php line 96
plz check the issue thank you in advance
Thanks - I'll take a look when I'm back from travelling, which will be later this week.
Allan
Looking that the HTML ("View source") on the
registeredevents
page the HTML is very broken:Is it possible the wrong template is being included in the
tbody
? Certainly the HTML contains no closingtbody
ortable
. If you pass it through the W3C validator it will show a large number of errors.Allan
First of all sorry for my late reply...Yes you are correct a page is being called on it just after i have used the render tag <?php echo $data->render(); ?> this render function...which causes a new page just after it..it can be seen in google inspect element which causes my footer and other closing tags after it disappears it is showing the below page on it I dont know what to do if i remove render my css goes with it of datatables but my below elements can be seen in that condition if not thier is css but below contents disappear..plz Suggest anything
<body>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.11/css/jquery.dataTables.min.css">
$(document).ready(function(){ $('#appointmentTable').dataTable(); });</body>
Hidden page is here ---
If you link to the page I'll be happy to look over it. I'm afraid I don't see the issue from the above.
Allan
http://drramjasshospital.com/showeventstopatient here it is you can see the source code by inspecting element i have written the code and enclosed all the tables and tags but after <?php echo $data->render(); ?> rendering the page it removes below tags and place its own code above
It still appears to have the issue we discussed above. There is another HTML page embedded into it. Did you validate it with the W3C validator?
DataTables will only operate correctly with valid HTML code.
Allan
Sorry For the late reply's yes You are right...i have that page comming up aint created by me its the rendered page comming up which is only being showed up in google inspect element and below table all the divs or any thing i have created is being cleared insteed the blank is shown....As You told i have tried w3 validations but not effective the page still got the error... i just dont understand what the problem is with it...Please suggest anything
If you "view source" on your page, you can copy the HTML and paste it directly into the W3C Validator. It is showing at least 10 errors. I would suggest you fix them before anything else.
Allan
Thanks Allan for the review...I have checked the errors with w3 validation...but due to the html5 use in my website many tags were not supported as w3 validators currently not support html5...still i check it and will remove all the errors and check if its working....thanks allan again
The W3C validator supports HTML5 just fine. Your document isn't actually a valid HTML5 document - it doesn't start with
<!doctype html>
to indicate that it is an HTML5 document for example. The first tag must be<html>
- but in your document it is<meta>
. There is no closing</html>
, or event</body>
.There are a lot of HTML errors there I'm afraid and DataTables is currently only supported with valid HTML.
Allan
Okay Thank you alan i'll check for it...
Hey Alan thanks for your help got the issue resolved it was due to the colliding of two scripting functions ie my render function ie <?php echo $data->render(); ?> which causes the whole part of code beaneth it disapperar and the upto top button script ie
<noscript>Not seeing a <a href="#">Scroll to Top Button</a>? Go to our FAQ page for more info.</noscript> these were the issue thanks for your time on this problem...