Drupal Computed Field with Views - drupal

I have some Computed Fields and in these fields, I get some HTML codes with simple_html_dom.php class from some sites. Codes works perfectly on pages, but when I try to get these fields to use in a View, Drupal gives the following error.
http://i.stack.imgur.com/W2Rhc.jpg
Anybody can help?

Even if it is not the best solution, after installing Views PHP module of Drupal, problem is slightly solved. I still get the error message on every time I try to change something, also I am having difficulties on making a change on the view, like saving and adding the same thing 5 times and got successfull, still it is a solution.

This message usually appears when you try to save the form before the ajax process has finished.
Try checking the 'network' tab on developer tools installed within Google Chrome or by using a tool similar to firebug. This will show you the request being made via ajax and should give you more information to debug.

Related

Drupal 7 - Server Error 500 when adding a Filter to views

For some reason when I try adding a filter to any view that I have, I receive the Server Error 500.
In Google Chrome I get
this.
In Firefox I get this this.
To be detailed, I have a view that currently displays published articles. All Articles are translated into Spanish and English. I am trying to add the filter: Content:language and set it to user current language.
When I save, the page refreshes and the temporary changes notice is shown. I try saving a second time and the Server Error comes up. This happens for both web browsers.
Could it be a that I have to enable a read/write for a certain file? If so, I don't know which file to look for.
Can anyone shed some light on this for me ? I have been at it for about 13 hours...
After taking the advice from #Rainfall in the comment, I found another post on Drupal's forum with the solution/ patch for this issue.
Here is the post with the solution
Comment #9 gave a patch that worked for others and it worked for me too. More in depth info on the issue is there as well.

Woocommerce product pages blank?

I am having a strange problem where my product pages are blank most of the time in woocommerce. If you click a product, sometimes it may or may not load, and if it doesn't, you have to refresh it multiple times until the page finally shows the content. I noticed this only happens to users who are not logged into wp-admin.
I had W3 caching plugin but I deactivated and deleted and the problem still persists? I am not sure how this started... I am using the most updated version of woocommerce.
Website: http://museiam.ca/
I would appreciate any help as I'm quite stumped.
Issue #1 - Failing to load, redirect loop
According to your comments about the error logs the product page is doing a redirect to itself, and getting stuck in that loop. This explains the "10 internal redirects" error message. The access log error is likely just a side effect of having so many of the same repeat requests in such a brief time window.
Note that I could not reproduce this issue, but I got a very similar issue (below). I was unable to determine why this is happening through poking around. This may take some code investigation (aka, on your end). Is this a custom WP theme?
Issue #2 - Loading complete, but not displayed
A second type of error occurs which is similar. Middle-click or open a product in a new tab. Or click on a direct link to a product, such as: http://museiam.ca/product/black-cut-sleeve-sweater/
The content will load, but it will be a white page. In this case, the javascript has loaded content but did not complete the loading event to make it visible.
You can confirm the second issue by opening your dev tools (for chrome: F12), and entering the following javascript into the script console:
jQuery('.global_content_wrapper').css('opacity', 1)
This should make the content visible.
EDIT: It seems issue #2 is also inconsistent, sometimes it does work - though much less often than following a link from within the website. These two issues may be one in the same.

HTML formatting error on Umbraco workflow notification emails

I've posted this in the Our Umbraco forum (http://our.umbraco.org/forum/ourumb-dev-forum/bugs/30914-HTML-formatting-error-on-workflow-notification-emails) but would like to expand the audience as I need a quick resolution to this problem.
There appears to be an issue with the HTML used in workflow notification emails, property names are displayed but their values are not visible. The HTML content is there and if I save the source as an .htm file and view it in Firefox the values are displayed (although in the wrong location).
The HTML is generated from the sendNotification function in the umbraco.cms.businesslogic.workflow namespace, I am using Umbraco v4.7.1.1 and this problem was noticed in Outlook 2007.
Has anybody else encountered this problem?
It appears that this issue has been logged with Umbraco (http://umbraco.codeplex.com/workitem/26577) but has not been addressed.
The fix is a simple code change, for my current project I have decided to download the CMS source code and make the change myself. This works but throws up maintenance issues e.g. ensuring my change is not wiped out during a CMS upgrade.

Correct way to link to new page in canvas page app php-sdk

I'm running in to a couple of issues and wondered if anyone had any insight. I'm using the latest php-sdk I'm developing a canvas app that has a number of different steps. These steps are spread across multiple pages. Now when I first enter the app everything seems to work fine. The access token is there and I can call the api functions. On the second page (which is linked to in the same iframe) I get OAuth errors. Now if I use this on the 2nd page:
$me = $facebook->getUser();
var_dump($me);
it returns the correct user id, but I still get errors when trying to use an api query (specifically a FQL one in this instance)
Now, bear in mind these links are within the iframe so I was assuming the signed_request is getting lost somewhere, I know facebook normally issues this via a POST. If I set all my links to target="_parent" with a url such as http://apps.facebook.com/myapp/page2.php then everything works fine. Facebook clearly posts the correct info this time. Subsequently, then when I use links that only redirect the iframe it seems to work fine again (implying a cookie is being set somewhere).
Now I've seen other apps that don't have a target="_parent" that seem to work correctly, only ever loading the iframe on subsequent clicks and not the full facebook site. So I can only assume they are storing this info somewhere. I've tried to inspect these apps using httpfox but I can't see anything obvious. Does anyone have any links for best practice with multiple page apps? I know I can get around this using full urls and target="_blank" but I would like to know what's going on here. I've looked through the developer docs and the canvas page examples, but there's nothing obvious to me.
Any help or info would be appreciated
Many Thanks
There is some ways to achieve this
using Facebook JavaScript SDK (which will set cookie for you, so PHP-SDK can rely on it)
issuing POST request to your pages including signed_request from initial page loaded in canvas

How do I submit a form with a large file upload and send ajax requests?

This works in other browsers but not in chrome. I am trying to allow users to upload large files and have an ajax call to update them on the progress of the file upload.
So a unique ID is generated on the client side and added to the action of the form before sending. Then the form is submitted (form only contains a file upload input) and an ajax call is made to get the progress of the upload.
The ajax call goes to another page and uses the ID to lookup the upload.
I am using JQuery 1.5.1. Debugging this and putting something on the error function give me nothing other than "error". Not very helpful. I used Chrome's debugger and it just says failed to load resource xxxx.aspx. xxx.aspx is the URL i needed. Turns out that there seems to be some sort of conflict between the form and the ajax call.
Is there some way to get around this?
you should really look at SWFupload, a great flash based uploader, with concurrent upload and progressbar support. Also it makes it really easy to use server-side, you dont need to implement upload percentage view as it client-side based.
not exactly an answer to your question, but a link to a tool that can really help you drill down and find good error messages, step through javascript code and such would be firebug for Chrome, I got the IE and Chrome versions working and use it very regularly, it has been a life saver and greatly has decreased debugging time:
http://getfirebug.com/releases/lite/chrome/
I would suggest making firebug a common tool in your debugging arsenal.
Use SlickUpload
It is a server control and module that does exactly what you are looking for and takes less than 10 minutes to setup.
Documentation: http://krystalware.com/Products/SlickUpload/Documentation/overview/

Resources