Skip to main content
Topic: [ADDON] SimplePortal (Read 99586 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: [ADDON] SimplePortal

Reply #495
I don't have an answer just yet, article attachments certainly was updated/extended in this version.

Is this occurring when you try to save your edit or does the edit page not even appear?

If the edit page is showing up, does it show the existing attachments or is that area blank?
Be safe, Be kind, Happy Programing

Re: [ADDON] SimplePortal

Reply #496
I don't have an answer just yet, article attachments certainly was updated/extended in this version.

Is this occurring when you try to save your edit or does the edit page not even appear?

If the edit page is showing up, does it show the existing attachments or is that area blank?


Hey Spuds! The edit page loads. The attachments load in the editor as well. Everything is fine until the Save.

For what it's worth, don't rush to fix it. I made manual edits in the database to accomplish the immediate goal. Enjoy your weekend! Come to this at your leisure. ;)

Re: [ADDON] SimplePortal

Reply #497
Could you attach your PortalAdmin.subs.php file, I just want to make sure we are on the same file level or If I packaged it up wrong.  I really don't see how its throwing that notice.

Also when you go to save the edit, its not saving?  If no,  could you check your server error log for additional info.  The reason I ask is  that error is simply a notice (which should not be showing) but its just a notice which would not stop execution at that point.
Be safe, Be kind, Happy Programing

Re: [ADDON] SimplePortal

Reply #498
Here's the PortalAdmin.subs.php file from one of the installs. Correct, edits fail to save the information delta. Nothing shows in the server error logs???

Re: [ADDON] SimplePortal

Reply #499
Well on a positive note, it does show I made an edit in that area post RC2 and thats why my local install will not show the error.  What you have, in case you were not aware, has a bug !  Sorry about that, guess I lost track about that change with all the other things I've been updating!

Change 
Code: [Select]
		// They may have chosen to [attach] to an existing image
$currentAttachments = sportal_get_articles_attachments($article_info['id']);
foreach ($currentAttachments[$article_info['id']] as $attachment)
{
// Replace ila attach tags with the new valid attachment id and [spattach] tag
$article_info['body'] = preg_replace('~\[attach(.*?)\]' . $attachment['id_attach'] . '\[\/attach\]~', '[spattach$1]' . $attachment['id_attach'] . '[/spattach]', $article_info['body']);
}

To:
Code: [Select]
		// They may have chosen to [attach] to an existing image
$currentAttachments = sportal_get_articles_attachments($article_info['id']);
if (!empty($currentAttachments[$article_info['id']]))
{
foreach ($currentAttachments[$article_info['id']] as $attachment)
{
// Replace ila attach tags with the new valid attachment id and [spattach] tag
$article_info['body'] = preg_replace('~\[attach(.*?)\]' . $attachment['id_attach'] . '\[\/attach\]~', '[spattach$1]' . $attachment['id_attach'] . '[/spattach]', $article_info['body']);
}
}
Be safe, Be kind, Happy Programing

Re: [ADDON] SimplePortal

Reply #500
On second thought, let me repackage what I currently have in case I made more changes that I don't remember ! ... Be back in a bit!

Looking at the change log on github, looks like I made a couple of last min fixes, including the one @badmonkey reported.  So here is what is currently in the repo.  Sorry about this!
Be safe, Be kind, Happy Programing

Re: [ADDON] SimplePortal

Reply #501
Thanks Spuds! You da man! Treat yourself to a cold one, you've earned it!