Page 2 of 2

Re: Cataloger & CGFeedback, comments update problem

Posted: Wed Apr 09, 2014 12:19 pm
by JohnnyB
Bahh. I was scrubbed! :D
A UDT isn't defined as a "hack" since no core or module PHP files were modified (http://forum.cmsmadesimple.org/viewtopi ... 40&t=28132)

Re: Cataloger & CGFeedback, comments update problem

Posted: Wed Apr 09, 2014 2:36 pm
by zaidcrowe
True to both - i was just speculating as to why the original might have been deleted tbh!

Re: Cataloger & CGFeedback, comments update problem

Posted: Wed Apr 09, 2014 4:27 pm
by Jo Morg
Jo Morg wrote:
Tetsuo wrote:Try this to auto clear the cache when changes are made to Cataloger (or other) Content pages:

Extensions > User Defined Tags
Create a tag called "clear_cache":

Code: Select all

removed
Then go to Extensions > Event Manager > Find the ContentEditPost Event > add "clear_cache" as the last order event.

Now when the user makes a change to a page, the cache will be flushed.
IIRC JohnnyB posted a similar, if not the same, solution and was deleted by some moderator without even an explanation. IMO it's a perfectly legit solution, not a hack.
Just my two cents....
An explanation please? Are we to guess, why does this violates the rules???

Re: Cataloger & CGFeedback, comments update problem

Posted: Wed Apr 09, 2014 5:53 pm
by calguy1000
An explanation please? Are we to guess, why does this violates the rules???
A: The method mentioned is an internal (NOT FOR PUBLIC USE) method.
B: It effects the data of other modules and the core.
C: Could seriously impact site performance (we don't put stuff in caches for nothing)
D: It's a bad fix to a minor problem.

Frequently months after a user implements a half baked 'solutions' like this, others are re-diagnosing the secondary problems that they generate. or dealing with the complaints like 'this package is slow'. And it's not the dev teams responsibility (though it frequently falls on us) to clean this stuff up.

So therefore it's best to nip the problem in the bud before it starts.

Re: Cataloger & CGFeedback, comments update problem

Posted: Wed Apr 09, 2014 6:02 pm
by Jo Morg
That's an explanation I can understand and easily accept, and even enforce, thanks.
I didn't look in the API documents for that particular function lately and didn't noticed it had been removed (I could almost swear I've seen it there at some point, but I might be wrong, and that was why I didn't see it as a hack).
Point taken and explanation appreciated.
Thanks again.

Re: Cataloger & CGFeedback, comments update problem

Posted: Wed Apr 09, 2014 6:54 pm
by JohnnyB
Thank for the explanation Robert. :)

Personally, I'd rather be called out for posting half-baked, bad code than having something deleted punitively without explanation. Especially if that bad solution is already production.

A moderator's explanation immediately clears up any confusion while ensuring the forum's success as a valuable resource for the community.

Here's why:
1) Correcting the bad code and/or an explanation for the deletion would be documented in the forum thus increasing the forum's value.

2) A search will find similar posts suggesting UDTs using ClearCache(). If Jo Morg didn't ask why the posts were deleted, the next person wanting to know how to clear the cache using a UDT would learn how from other posts and implement the solution never knowing that it is not a supported method.

3) When we know "why" we can then rally behind it and help promote it.