? Success

User tests: Successful: Unsuccessful:

avatar bembelimen
bembelimen
16 Nov 2014

At the moment all JDocument render classes have to be placed into "libraries/joomla/document". You cannot load your own JDocument child class with e.g. a plugin, because if getInstance does not find the class file in the mentioned path, it fallbacks to JDocumentRaw.

With this patch the getInstance method checks first if the class exists (= e.g. loaded by plugin) and uses the JDocumentRaw class as fallback after the requested class does not exist and could not be loaded.

To test: create an own JDocument child class (like this PDF class: http://docs.joomla.org/J2.5:Creating_PDF_views), load it over a plugin and try to call it with "format=pdf" over the url.
Before the patch you should get the raw output, after you should get the PDF.

avatar bembelimen bembelimen - open - 16 Nov 2014
avatar jissues-bot jissues-bot - change - 16 Nov 2014
Labels Added: ?
avatar dgt41
dgt41 - comment - 16 Nov 2014

@bembelimen would you like to test if this one solves your problems? Needs one more test...

avatar bembelimen
bembelimen - comment - 16 Nov 2014

Hi, could you provide me a link from the patch you mean? Thanks

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5119.

avatar dgt41
dgt41 - comment - 16 Nov 2014

#4052 ????

avatar dgt41
dgt41 - comment - 16 Nov 2014

@bembelimen thats the right one: #4074

avatar bembelimen
bembelimen - comment - 16 Nov 2014

I think, you address a different target group than me, but we have the same problem :)

I want to create several components with a PDF export. So I just want to load my JDocumentPdf class without overriding anything. So my patch says: if the class already exists, just take it and don't look if the file is on the correct place.
You on the other hand support the "whole homepage creation devs" who create the template and everything.
So as conclusion I think, the best would be, if we could find a way to merge both ideas:

  1. if the class exists, just take it
  2. elseif an override exists take that
  3. elseif the class file is found in libraries/joomla/document take that
  4. fallback to raw

    This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5119.
avatar dgt41
dgt41 - comment - 16 Nov 2014

@bembelimen If we can combine them sounds like the perfect solution!

avatar bembelimen bembelimen - reference | a7ab55e - 16 Nov 14
avatar bembelimen
bembelimen - comment - 16 Nov 2014

@dgt41 I created a pull request for your pull request (or something like that...): dgt41#8

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5119.

avatar dgt41 dgt41 - reference | 06648b6 - 16 Nov 14
avatar dgt41
dgt41 - comment - 16 Nov 2014

@bembelimen Thanks! Now lets get some testers

avatar bembelimen bembelimen - close - 16 Nov 2014
avatar bembelimen bembelimen - close - 16 Nov 2014
avatar bembelimen bembelimen - change - 16 Nov 2014
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2014-11-16 02:47:03
avatar bembelimen
bembelimen - comment - 16 Nov 2014

Further discussion goes here: #4074

avatar dgt41 dgt41 - reference | f2227bb - 17 Nov 14
avatar dgt41
dgt41 - comment - 17 Nov 2014

@roland-d Can you please reopen this?

avatar jissues-bot jissues-bot - reopen - 17 Nov 2014
avatar jissues-bot jissues-bot - reopen - 17 Nov 2014
avatar zero-24 zero-24 - change - 17 Nov 2014
Status Closed Pending
avatar zero-24
zero-24 - comment - 17 Nov 2014

done @dgt41

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5119.

avatar jissues-bot
jissues-bot - comment - 17 Nov 2014

Set to "open" on behalf of @zero-24 by The JTracker Application at issues.joomla.org/joomla-cms/5119

avatar bembelimen
bembelimen - comment - 17 Nov 2014

So let's find some tester for this patch ;)

avatar Bakual
Bakual - comment - 18 Nov 2014

I agree with this PR. Code looks fine.
The current code doesn't make much sense (why load fallback if class exists already?).

To get tests, can you maybe provide a test plugin? That would surely make it easier for non-coders to test this.

avatar zero-24 zero-24 - change - 19 Nov 2014
Category Libraries
avatar bembelimen
bembelimen - comment - 20 Nov 2014

How can I append ZIP-Files to the PR?

avatar mbabker
mbabker - comment - 20 Nov 2014

GitHub doesn't allow ZIP uploads, you'll need to upload it somewhere else
and share the link here.

On Wednesday, November 19, 2014, bembelimen notifications@github.com
wrote:

How can I append ZIP-Files to the PR?


Reply to this email directly or view it on GitHub
#5119 (comment).

avatar bembelimen
bembelimen - comment - 20 Nov 2014

Here we go:

http://stuff.benjamintrenkle.de/plg_system_newdocument.zip

  • Install
  • Activate
  • Add "&format=dummy" to your URL
  • Before patch: "View not found" error
  • After patch: JDocumentDummy loaded
avatar dgt41
dgt41 - comment - 20 Nov 2014

@test succesful
Before:
screen shot 2014-11-20 at 4 07 11
After applying the patch:
screen shot 2014-11-20 at 4 08 28

avatar waader
waader - comment - 20 Nov 2014

@test successful

avatar waader waader - test_item - 20 Nov 2014 - Tested successfully
avatar infograf768 infograf768 - change - 20 Nov 2014
Milestone Added:
avatar infograf768 infograf768 - close - 20 Nov 2014
avatar infograf768 infograf768 - reference | 1b7bb4a - 20 Nov 14
avatar infograf768 infograf768 - merge - 20 Nov 2014
avatar infograf768 infograf768 - close - 20 Nov 2014
avatar infograf768 infograf768 - change - 20 Nov 2014
Status Pending Closed
Closed_Date 2014-11-16 02:47:03 2014-11-20 15:02:09
avatar bembelimen bembelimen - head_ref_deleted - 20 Nov 2014

Add a Comment

Login with GitHub to post a comment