New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Serializable interface and methods to JTable. Fixes #16185. #16216
Conversation
Comment of mbabker sounds like "no Core Issue" > close, @brianteeman? |
In some way this follows the advice Michale gave, but I have my doubts if we should cache table data this way. I might miss the point but what is when we cache the user table data, would that not allow to get the user data out of the cache and maybe misuse it. Maybe I am too paranoid :-) |
Personally I think caching a database related object (JTable, JDatabaseDriver) is asking for trouble and you're better off caching just the record data. Unfortunately there isn't an eloquent way to get just the record data ( The fix here is technically valid, anyone who is doing something resulting in the serialization of JTable objects avoids running into a scenario where the database driver gets included into the mix, and that's in general not a good object to serialize. |
I have tested this item 🔴 unsuccessfully on 82f9364
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16216. |
Note. K2 had a lot of updates last week so "maybe" they changed something. |
@Spudley can you please at this? |
@Spudley are you able to update this PR if this is still something that needs resolved? |
Hi @jwaisner. I am no longer maintaining the Joomla system that was exhibiting the bug and it's been two years since I last thought about it, so I'm not really in a position to follow it up any longer. Thank you. |
Set to "closed" on behalf of @jwaisner by The JTracker Application at issues.joomla.org/joomla-cms/16216 |
Closing PR and reopened issue report #16185 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16216. |
Pull Request for Issue #16185 .
Summary of Changes
Added Serializable interface and methods to JTable. Excluding the DB object from serialization, because under some circumstances the DB object may contain closures; these are unserializable, and thus caused a crash when serializing JTable.
Testing Instructions
Serialization of 'Closure' is not allowed
.Expected result
See above: The category view should work correctly in debug mode.
Actual result
Without the patch, navigating to the category view in debug mode crashes and gives the following error:
Documentation Changes Required
None.