User Is Logged Out When Generating PDF with DomPDF & Joomla 2.5 - joomla

I have integrated DomPDF with a Joomla site that I am working on. I followed the Creating PDF Views article to achieve this and generating PDFs works well except that when the link is clicked and the PDF is generated from the component the user is logged out. I am using Joomla 2.5 & DomPDF 0.6.0 beta 3, the content for the PDF is generated from a custom component but right now it is just flat HTML and follows the instructions in the article for generating the view. I have looked at the code but can't seem to see where the problem is. Any help is greatly appreciated.
EDIT: The user does not get logged out if 'Remember Me' is checked on login. Also didn't mention that I am using Database as the setting for sessions.

Check the custom component that clearing the user object or not.
Any where session_destroy() or unset($user) or any other Factory call to reset the user object.If you can't find such a statement then the make sure the problem with that PDF creation.
In no way you can't get solution then try this.
Before creating PDF section current logged user object id set to Cookie you mentioned that it was not clearing remember me option.
$user = &JFactory::getUser();
echo $user->id //current logged user id.
and the process PDF again put it back to user object like.
$user = &JFactory::getUser($user_id);//from cookie.
This is not a perfect fix but your problem will solve.
Hope this will help..

Related

php page to be included in joomla

I have written a php page that is getting data from a database and graph it via highcharts javascript.
I would like now to be able to put that in joomla and then use the username from joomla to graph the specific data from that user.
How can I do that?
Thanks for your help,
John.
You should use an iFrame Wrapper menu item whenever you want to include a page that isn't part of your Joomla website.

Joomla registration error

In the website http://www.ple-intl.com/NewUpgrade, I am using joomla 2.5 & getting an below error during registration
It registered the user but, does not send the activation link, however it is set as a self in user options.
when user click on register after filling form it shows an 404 error. (personally i dont change any thing core, & i dont want to but i am getting an error i checked all the things)
Some Plugin Information
I installed virtue mart in it, but every thing is defualt
I am user Super Login Module for login registration which calls the default joomla signup page.
Kindly guide what i am missing..I am tired to sort that out but none of my idea works.
Thanks it start working now, below i have mentioned the reason why it showing error.
The email i was inserted is actually registered before & when i remove that id i did'not remove the product related to it in virtue mart.
second virtue mart registration activation link which send in email has some problems, on the below link solution is discussed.
http://forum.virtuemart.net/index.php?topic=99755.0

Some Page links are not working when i am not logged in Pyrocms

I have a strange issue when i am logged in and exploring the pages created from CP all goes well. But when i am logged out and go to the same page it says Page missing. What is the problem? Also this is only happening only on those pages where i am not using any tags to display data from database tables. It is happening on about use page etc
I have found the problem. Using Access options i change from default to live and now it is working fine.

Virtuemart 2.0 and user register

I'm using Joomla 1.7.3 and Virtuemart 2.0, everything works except the registration of users, in previous virtuemart this worked by default, but now I can not register new users, some clue about the problem?
There are two things happening.
In VM 2.0 there is some XML missing that allows you to specify a link to a registration form - if you use the account maintenance option it gets a slightly different page (see this thread on the VirtueMart 2.0 forum). This is already fixed in the prerelease version 2.0.1b and hides some unwanted fields.
To link to the correct page you should use a Joomla! menu type of System Links -> External URL and set the Link field to:
/index.php?option=com_virtuemart&view=user&layout=editaddress
The "Please enter your name." means that the field is defined in VM2's configuration as Required. I believe the problem occurs because neither the Account Maintenance or the link I provided above give the user a chance to enter a user name. The work around is to point them to a standard Joomla! registration page and then when they checkout they can complete the rest of their details.
(In VM2 shoppers are standard Joomla! users so this is a perfectly acceptable way around it).
with the link you told me the problem is still happening, so I was to comment the line of user.php that making the validation in the method check()
if (trim($this->name) == '') {
$this->setError(JText::_('JLIB_DATABASE_ERROR_PLEASE_ENTER_YOUR_NAME'));
return false;
}
the value for this->name is empty, why??? with this lines comment, i can register and login on virtuemart....

Custom Joomla Registration Form and Profile

I want to create a custom Joomla registration form and a profile to show the information saved. For this I followed the answer on this thread. I have cloned and changed the files of the user profile plugin. Now the problem is that the edited profile form is not displayed after I have enabled the plugin. I have a login link on my site, which on success redirects to a profile display page after that. When I click edit on the profile display page, the edit profile form is still the same old one and it is located at profile?layout=edit. All it has is:
Name
Username
Password
Confirm Password
Email
Confirm Email
Basic Settings
Why is this not working. The installation was also fine.
Is this even the right way of doing this.
Please help with this. I appreciate all the help. Thanks!
See original Joomla docs on how to add a profile plugin in Joomla 1.6
http://docs.joomla.org/Creating_a_profile_plugin
I ended up going with Community Builder. It has amazing search features.

Resources