Welcome Guest, Not a member yet? Register   Sign In
CI goes crazy with iframes
#1
Bug 

Hi,
I was trying to embed youtube videos into my website.
When CI encounters an iframe tag on the page it throws a whole load of errors basically going through my model class and finding an error with every method.
My model class is working fine.
This is very unusual, I have no idea where the errors are coming from.  Even when the iframe is not in a PHP block the output at any iframe is a bunch of erroneous error messages.
Does anyone know what is going on here?
I believe I am using CI version 3.
Here is the code for my partial view:
Code:
<section>
   
     <!-- <iframe width="300" height="300" src="https://www.youtube.com/embed/mIStB5X4U8M" title="Prime numbers | Factors and multiples | Pre-Algebra | Khan Academy" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> -->
            <iframe src="https://programiz.pro" title="programiz pro website" height="500" width="500" ></iframe>
            <?php
// $youtubeurl = "https://www.youtube.com/embed/mIStB5X4U8M";
// $youtubeurl = "https://www.youtube.com/watch?v=mIStB5X4U8M";
// echo '<iframe width="560" height="315" src="'.$youtubeurl.'" frameborder="0" allowfullscreen></iframe>';

?>
    </section>

This is the error that is shown when this view is displayed
Code:
A PHP Error was encountered

Severity: Notice

Message: Trying to get property 'section' of non-object

Filename: models/CourseModel.php

Line Number: 47

Backtrace:

File: /home/wayconte/public_html/Course/application/models/CourseModel.php
Line: 47
Function: _error_handler

File: /home/wayconte/public_html/Course/application/controllers/Course.php
Line: 79
Function: getPrevTopic

File: /home/wayconte/public_html/Course/index.php
Line: 322
Function: require_once
A PHP Error was encountered

Severity: Notice

Message: Trying to get property 'topicOrder' of non-object

Filename: models/CourseModel.php

Line Number: 52

Backtrace:

File: /home/wayconte/public_html/Course/application/models/CourseModel.php
Line: 52
Function: _error_handler

File: /home/wayconte/public_html/Course/application/controllers/Course.php
Line: 79
Function: getPrevTopic

File: /home/wayconte/public_html/Course/index.php
Line: 322
Function: require_once
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/wayconte/public_html/Course/system/core/Exceptions.php:272)

Filename: core/Common.php

Line Number: 573

Backtrace:

File: /home/wayconte/public_html/Course/application/models/CourseModel.php
Line: 61
Function: get

File: /home/wayconte/public_html/Course/application/controllers/Course.php
Line: 79
Function: getPrevTopic

File: /home/wayconte/public_html/Course/index.php
Line: 322
Function: require_once
A PHP Error was encountered

Severity: Notice

Message: Undefined property: CI_Exceptions::$load

Filename: html/error_db.php

Line Number: 81

Backtrace:

File: /home/wayconte/public_html/Course/application/views/errors/html/error_db.php
Line: 81
Function: _error_handler

File: /home/wayconte/public_html/Course/application/models/CourseModel.php
Line: 61
Function: get

File: /home/wayconte/public_html/Course/application/controllers/Course.php
Line: 79
Function: getPrevTopic

File: /home/wayconte/public_html/Course/index.php
Line: 322
Function: require_once
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/wayconte/public_html/Course/system/core/Exceptions.php:272)

Filename: core/Common.php

Line Number: 573

Backtrace:
Exception : A serious error has occurred
Please report the following information to IT
An uncaught Exception was encountered

Type: Error

Message: Call to a member function view() on null

Filename: /home/wayconte/public_html/Course/application/views/errors/html/error_db.php

Line Number: 81

Backtrace:

File: /home/wayconte/public_html/Course/application/models/CourseModel.php
Line: 61
Function: get

File: /home/wayconte/public_html/Course/application/controllers/Course.php
Line: 79
Function: getPrevTopic

File: /home/wayconte/public_html/Course/index.php
Line: 322
Function: require_once

Can anyone tell me why CI is spewing this out when it encounters an iframe?

Many thanks,

Fintan
Reply


Messages In This Thread
CI goes crazy with iframes - by CelticPhantom - 02-25-2024, 04:05 PM
RE: CI goes crazy with iframes - by luckmoshy - 02-25-2024, 10:26 PM
RE: CI goes crazy with iframes - by CelticPhantom - 02-26-2024, 07:35 AM
RE: CI goes crazy with iframes - by InsiteFX - 02-26-2024, 10:41 PM
RE: CI goes crazy with iframes - by JustJohnQ - 02-27-2024, 03:37 AM
RE: CI goes crazy with iframes - by CelticPhantom - 02-27-2024, 06:26 AM
RE: CI goes crazy with iframes - by JustJohnQ - 02-27-2024, 08:01 AM
RE: CI goes crazy with iframes - by CelticPhantom - 02-27-2024, 10:24 AM
RE: CI goes crazy with iframes - by JustJohnQ - 02-27-2024, 01:57 PM
RE: CI goes crazy with iframes - by CelticPhantom - 02-29-2024, 07:56 AM
RE: CI goes crazy with iframes - by JustJohnQ - 02-29-2024, 09:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB