Page 16 of 21

Re: A new gallery manager : Album

Posted: Sat Oct 07, 2006 6:50 am
by Russ
HI Elijah, how is the course going?

No it does it on three installs I have. No error in admin log or in web log. Even if I turn off the Editor (TinyMCE). I am editing the comments for a whole album. Edit comments, Change or type something, click apply or save or whatever. Screen reverts to the original before editing, cancel does not work.? Stuff is not saved. Any other ideas?

Russ

Re: A new gallery manager : Album

Posted: Sat Oct 07, 2006 5:38 pm
by Elijah Lofgren
Russ wrote: HI Elijah, how is the course going?
Very busy.

Russ wrote: No it does it on three installs I have. No error in admin log or in web log. Even if I turn off the Editor (TinyMCE). I am editing the comments for a whole album. Edit comments, Change or type something, click apply or save or whatever. Screen reverts to the original before editing, cancel does not work.? Stuff is not saved. Any other ideas?
I'm unable to reproduce, thus I can't fix. Sorry. You could try editing it directly in the DB by using phpMYadmin

Re: A new gallery manager : Album

Posted: Sat Oct 07, 2006 8:17 pm
by Dr.CSS
Just curious how did you install Album 0.7.3?

Re: A new gallery manager : Album

Posted: Sun Oct 08, 2006 7:51 am
by Russ
Elijah:
No problems I can fix the database for now.

mark:
What is your thinking? I installed this by copying it over. I will try uninstalling (but of course that loses the albums), via the module manager.

Russ

Re: A new gallery manager : Album

Posted: Sun Oct 15, 2006 6:20 am
by Russ
OK, I've tried re-installing by XML, by copying again and also downgrading a version. Moreover I've discovered I can also not save templates. It does not save and just re-appears. The cancel does not work. I can save 'Options' and albums, but not album comments. I've tried it on two machines so it is unlikely to be my database - or is it?

Any ideas anyone?

Russ

P.S. Actually I can't create Albums now, it's like the permissions are not being set, but 'Use Albums' is ticked?

Re: A new gallery manager : Album

Posted: Sun Oct 15, 2006 9:52 am
by Russ
Further to the above post. I've tried this on my test site running CMS 1.0.1 / PHP 4 / SQL 4. This does seem to work.
However on my two other test sites which are
CMS 1.0.2 / PHP 5.1.4 / MSQL 5.0.19 local Mac and a
web server CMS 1.0.2 / PHP 5.1.46/ MSQL 5.0.18
It does not work. Perhaps something to do with differing PHP or MySQL version or the fact?

Russ

Re: A new gallery manager : Album

Posted: Sun Oct 15, 2006 4:34 pm
by Dr.CSS
Any way you can do it with PHP 4 and MySQL 5.0.*, I'm thinking it's the PHP...

The other thread: I was thinking it was a problem with installing it thru Module Manager, it seems to give a problem with modules that need you as owner and not the server, install by MM has a tendency to make the server the owner.

Re: A new gallery manager : Album

Posted: Thu Oct 26, 2006 7:54 am
by kts
I have found out, that in the comments (not photos) CMS-links dont work. They appear as follow on the page : {cms_selflink page='42' text='my link'}

Re: A new gallery manager : Album

Posted: Sun Oct 29, 2006 6:42 am
by Russ
I appear to have found my solution to my Album problem:
There appears to be a bug with Album version 0.7.3 where it does not save the comments for an actual album (not photo), at least in the version I have. I can alter the an albums name and save it but not the comment for an album. Can anyone else confirm this as a bug?
I had modified 'modform.inc.php' code in module support to try and get the in-built 'Search' module to verify as valid XHTML. Otherwise it fails with
Error  Line 98 column 359: there is no attribute "name".
... <form id="cntnt01moduleform-1" name="cntnt01moduleform-1" method="get" actio
Basically the 'name attribute has been deprecated. Piratos pointed out the role of 'modform.inc.php'  so I amended it like so...

Replacing...

Code: Select all

	//$text = '<form id="'.$id.'moduleform-'.$idsuffix.'" name="'.$id.'moduleform-'.$idsuffix.'" method="'.$method.'" action="'.$goto.'"';//moduleinterface.php
with...

Code: Select all

$text = '<form id="'.$id.'moduleform-'.$idsuffix.'" method="'.$method.'" action="'.$goto.'"';//moduleinterface.php
... basically losing the 'name' attribute, which of course enables the 'Search' module to validate. One unforeseen problem was my problem with Album above.

Now, either I did this wrong (quite likely), or Album is using the 'name' attribute to do some stuff - which perhaps it shouldn't?? Either way I can have Album working and an invalid search form or Album not working and a valid search form. This problem may affect other forms.

Hope this helps, I'll cross post under a seperate topic ' Valid XHTML Search module, modform.inc.php, Album and perhaps other modules', with a link to here because it may effect other modules.
http://forum.cmsmadesimple.org/index.ph ... 795.0.html

Does not seem to be fixed in Album 0.7.4

Russ

P.S. I have to say I find this smarty form stuff a bit complicated and perhaps it is a bit of a memory / speed hog??

Re: A new gallery manager : Album

Posted: Sun Oct 29, 2006 12:05 pm
by tsw
There are few problems with removing name attribute, thats why its still there.

http://www.quirksmode.org/oddsandends/forms.html

and google for more

if you find a way please tell and we'll change it

Re: A new gallery manager : Album

Posted: Sun Oct 29, 2006 3:04 pm
by Russ
Hi tsw, the example you give is not the same I think?. Having 'name' attributes on form elements is fine as you suggest and using 'name' and 'id' for such elements is the right way to go. However the 'name' attribute in question is on the form call itself and is not wanted or needed.

Code: Select all

<form id="cntnt01moduleform-1" [b]name="cntnt01moduleform-1"[/b] method="get" action="index.php">
The XHTML validation error is on name="cntnt01moduleform-1" no where else. The 'id' and 'name' on the rest of the form elements are fine and at worse unneccessary.

So we shouldn't have it and don't need it apart from modules which maybe use - but then they shouldn't, should they? e,g, they shouldn't be relying on invalid code?

Also while we are at it can we please have some classes on form elements like a "submit" class on the submit button to allow for simplier styling. CMSMS is getting a bad case of 'DIVititus'

Hope this clears it up, what can be done. Do any other rmodules rely on the 'name' of the actual form?

Russ

Re: A new gallery manager : Album

Posted: Sun Oct 29, 2006 3:53 pm
by tsw
ah, okey I misunderstood.

Ill try to see what we can do about this

Re: A new gallery manager : Album

Posted: Sun Oct 29, 2006 4:52 pm
by Russ
Thanks tsw, I guess it quite simple to change the 'modform.inc.php' as per my example, which gives you valid code, but not so easy to fix any broken module forms which may require the 'name' element (e.g Album,), can't really see qhy they should though. Don't forget the 'submit' class on the submit. e.g.

Code: Select all

function cms_module_CreateInputSubmit(&$modinstance, $id, $name, $value='', $addttext='', $image='', $confirmtext='')
{
	global $gCms;
	$config =& $gCms->GetConfig();

	$text = '<input class="submit" name="'.$id.$name.'" value="'.$value.'" type=';

Russ

Re: A new gallery manager : Album

Posted: Thu Nov 09, 2006 4:05 am
by Russ
There maybe another fault with modform not adding both id and name to a password field? Seems like it in FrontEndUser 1.1.2?
Russ

Re: A new gallery manager : Album

Posted: Thu Nov 16, 2006 10:13 pm
by MichaelK
Is there any way to show the latest four images that you added?