filupload partial display

Status
Not open for further replies.

andrei

New Member
Can you tell me why the fileupload element displays only 4 pictures out of 29 on monument page?

Monument page:
http://multicult.ro/index.php?option=com_fabrik&view=details&formid=5&rowid=5&Itemid=149&lang=ro
On the registered interface, the AJAX fileupload element displays the 5th picture filename cropped.:mad:
The fileupload element limit number is set for 40 pictures.

But on another page, a museum page, it displays the full number of pictures, 26 of 26::)
http://multicult.ro/index.php?option=com_fabrik&view=details&formid=4&rowid=495&Itemid=149&lang=en

Monuments are connected to museums by a hidden field.

My colleague have had the same issue on museums before, when my colleague reached 10th picture on the file upload element (by AJAX), the name of the 10th was cropped. But now it works fine on the museums form, but i can't seem to make it work the same for monument form. :confused:


My installation has:
PHP Version 5.3.3
Web Server Microsoft-IIS/6.0
Joomla! Version Joomla! 2.5.8 Stable [ Ember ] 8-November-2012 14:00 GMT
Mysql database
Fabrik 3.6.3, I've updated 3 weeks ago from github.

Thank you
 
Can you enable Fabrik Debug, in the Options button, top right of the Lists page.

I need to see what is coming back from our data query for that form.

-- hugh
 
I enabled fabrik debug

ok, i enabled fabrik debug.

What is the problem ?

[monumente_repeat_imagefile___imagefile] is broken :eek:
and it is followed by [monumente_repeat_imagefile___imagefile_raw]

pictures are retrieved in descending order.

i look at the following and i find the oddity
form:getData from querying rowid= 5 (form not in Mambot and no errors)
form:data
form:view:groups

i can say that the behavior is different ??? :
- english form displays 10/29 pictures; http://multicult.ro/index.php?option=com_fabrik&view=details&formid=6&rowid=5&Itemid=149&lang=en
- romanian form displays 4/29 pictures; http://multicult.ro/index.php?option=com_fabrik&view=details&formid=5&rowid=5&Itemid=149&lang=ro

Thanks
 
Hmmm, interesting. It looks like, for reasons I currently don't understand, the query result that should build the file paths is being truncated.

If you look at the GetData() result, you can see that the raw values are all there (the row numbers in monumente_repeat_imagefile___imagefile_raw), but the actual file paths in monumente_repeat_imagefile___imagefile have been truncated.

Those values come from this part of our query (under "form:render" in the debug results):

Code:
SELECT GROUP_CONCAT(imagefile SEPARATOR '//..*..//') FROM monumente_repeat_imagefile WHERE parent_id = monumente.id

Could you try executing that query in phpMyAdmin, or whatever you use for database management? Use the actual monumente.id that example page is loading, which is 5, so the query you should test is:

Code:
SELECT GROUP_CONCAT(imagefile SEPARATOR '//..*..//') FROM monumente_repeat_imagefile WHERE parent_id = 5

... and see if it returns the entire list of paths as it should, or if the result you get is also truncated.

I'd also like to see what the complete file path for that 5th record should be, so while you are in phpMyAdmin, take a look at the row with id 10 in the monumente_repeat_imagefile table. Paste the imagefile path from that row here.

-- hugh
 
Ah HAH! It looks like we may be running in to issues with the MySQL group_concat_max_len. I haven't counted the characters, but I'm willing to bet that response is being chopped off at 1024 characters, which is apparently the MySQL default for the group_concat_max_len system setting. I'm surprised we haven't run across this before with the AJAX upload.

Can you try this for me ...

In ./components/com_fabrik/models/list.php, around line 516, should be this code:

PHP:
		if ($bigSelects)
		{
			$fabrikDb = $this->getDb();
			$fabrikDb->setQuery("SET OPTION SQL_BIG_SELECTS=1, GROUP_CONCAT_MAX_LEN=10240");
			$fabrikDb->query();
			
		}

... within a function called setBigSelects. Can you modify the setQuery to this:

PHP:
			$fabrikDb->setQuery("SET OPTION SQL_BIG_SELECTS=1, GROUP_CONCAT_MAX_LEN=10240");

... which should up that limit to 10kb instead of 1kb.

After editing that, go to the Fabrik global options (button top right of Lists page), and set "Enable big selects".

Let me know if that fixes the issue, which I'm pretty sure it should. Unless of course your list of file paths is longer than 10k bytes, in which case you may have to bump that number in the code up a bit.

-- hugh
 
As I'm about 99.999% sure this is the problem, i went ahead and committed the code I gave you a couple of posts ago.

So you just need to update from github, and set that "Big Selects" option in the Fabrik global options.

-- hugh
 
That solved it!

Thanks,

It just did it. 2 modification and the problem was solved, thanks, that was a it ! :D

A.
I modified the line

$fabrikDb->setQuery("SET OPTION SQL_BIG_SELECTS=1");

into

$fabrikDb->setQuery("SET OPTION SQL_BIG_SELECTS=1, GROUP_CONCAT_MAX_LEN=10240");

After that i modified in fabrik Global Options to enable Big Selects, and checked out the result, it was flawless. Thank you!

B.
I tried to leave only fabrik Global Options with Big Select enabled, and changed back the line into what was before your solution, and the error was back.

So, both actions need to be taken.

Thanks :D
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top