Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
ReyDev Posted February 22, 2022 Posted February 22, 2022 when I delete an item using the delete() method of conten\item class, the item is deleted but throws an exception with no message. why?
Daniel F Posted February 22, 2022 Posted February 22, 2022 I can't reproduce this, what's the full error stack?
ReyDev Posted February 22, 2022 Author Posted February 22, 2022 (edited) @Daniel F Request URL: *************** Request Method: GET Status Code: 500 Internal Server Error Remote Address: [::1]:80 Referrer Policy: strict-origin-when-cross-origin BadMethodCallException No message Stack frames (9) 8 BadMethodCallException *******\system\Content\Item.php1452 7 IPS\Content\_Item url *******\system\Content\Content.php2479 6 IPS\_Content adjustSessions *******\system\Content\Content.php409 5 IPS\_Content delete *******\system\Content\Item.php2587 4 IPS\Content\_Item delete *******\story\story.php242 3 IPS\valastory\modules\front\story\_story deleteStory *******\system\Dispatcher\Controller.php90 2 IPS\Dispatcher\_Controller execute *******\story\story.php36 1 IPS\valastory\modules\front\story\_story execute *******\system\Dispatcher\Dispatcher.php153 0 IPS\_Dispatcher run *******\index.php14 is the problem about the url() method ? I didn't implement this method! Edited February 22, 2022 by ReyDev
Solution teraßyte Posted February 22, 2022 Solution Posted February 22, 2022 4 hours ago, ReyDev said: is the problem about the url() method ? I didn't implement this method! Yes. The delete function uses that method in the last line for the IndexNow service: \IPS\core\IndexNow::addUrlToQueue( $this->url() ); ReyDev 1
Daniel F Posted February 23, 2022 Posted February 23, 2022 Well, in theory an item needs to have a valid URL, but there are few cases where it's not going to be the case e.g. Records::url() can also throw an LogicException when the Record which is being deleted belongs to a database which isn't associated with any public page. That said, I have reported this to our internal bug tracker, so that we can investigate this further.
Recommended Posts