When I go to admin/build/modules, anonymous users get access denied - drupal-6

I go to admin/build/modules, without changing anything, and click 'Save Configuration'
In the database table menu_router it remove the access_callback value for items that had a value of either 1 or 'user_access'.
As a result, on pages that anonymous users should be able to get to, they get a access denied message (You are not authorized to access this page).
I was able to set the values in the database manually, but this really isn't a long term solution every time I go to admin/build/modules.
Today is the first day this started happening. I did change some menu items because I wanted to update their function names. After updating it, I went to admin/build/modules, then devel/menu/reset, then admin/settings/performance and cleared cache. I'm not sure what exactly could have been done to cause this.

In the file includes/database.mysql.inc, in the function db_escape_string, I had some custom code.
function db_escape_string($text) {
global $active_db;
if (!is_string($text)){ return '';} //custom
return mysql_real_escape_string($text, $active_db);
}
I commented out my custom code and it works fine now.

Related

'When an item is created or modified' trigger not firing until manually saved

I'm running into an odd issue where my Flow will not trigger correctly upon modifying a list item. I have flow set up to copy appended Col1 content to Col2 which can then be listed as an 'updated comment' in my list's default view.
It's the same logic as a SP2013 workflow I've been using, but for whatever reason the flow will not automatically trigger when an item is created/modified in my list - it will only trigger if I go back into the flow and manually save it (the Flow) again. Additionally, if I manually save the Flow a second time, it wipes Col2's existing content.
I am not intimately familiar with any quirks found in the 'When an item is created or modified' SharePoint trigger in Flow, but it's possible I'm missing something obvious.
Below is the logic I'm using.
'Comment Update' MS Flow example
Any help would be much appreciated, I haven't been able to find any posts going over this Flow trigger specifically. It seems like there would either be a very obvious solution to this, or this is a glaring bug with Flow.
Thank you for your time.

basic blue prism email login object

Trying to learn basic blue prism.
I have made an object to login to my gmail account.
It enters the page where mail id has to be entered. The email id gets entered and the next page appears where the password has to be entered. But in the writer tool it shows the following message : "Internal : Failed to perform step 1 in Write Stage 'Writer2' on page 'Initialise' - No elements match the supplied query terms"
I looked into all the most obvious bugs and I cant find anything wrong. Can someone please give any suggestions as to what the problem could be?
The specific error message you're getting indicates there's an issue with your spying of the element you're attempting a Write on.
Without knowing anything else about the way you've included/excluded certain attributes of the element you're attempting to write to, the only sound advice one could offer would be to open the Application Modeler and trial-and-error the "Match?" for each attribute until you're able to use the "Highlight" button and verify a single interface element is selected. (Usually in circumstances such as yours, the "Value" attribute of the element you've spied has its Match checkbox selected, but the value has changed since spying it, thus making it not a match.)
check if the data item you are storing the password in is of password type.
You can reset the password by going ahead with the "write" property and delete once and drag-drop again at the same place and click OK. reset the flowchart and run them again, you'll not get the error. I had faced the same issue earlier and got fixed.
It sometimes happens due to the slowness of your internet connection BP not able to read the data item info and directly moved to next steps, to fix it, you can use wait functionality and give the 8-10 sec of wait time.
Hope this helps.
stay blessed!
When spying a browser please make sure you are using HTML mode to capture the necessary Element (please note that BP only supports IE, so no Chrome or other browser!). Also, please remember that the browser page you are spying has to be launched from the Application Modeller in order to be "attached" by BP.
To cycle between modes, simply hit the Alt key after clicking "Identify" on the Application Modeller. After you have captured the correct area of the page where your password goes, uncheck all the attributes of the element that are blank and also the URL attribute (you should be left with 4 maybe 5 atributes left), then hit "Apply" and "OK". Click "Highlight" to make sure BP still finds the element of the page that you want. Then in your Process or Object canvas, use a "Write" stage and drop this element you just created in the Element field, and the password into the Value field (the value has to be between "" unless you are using a data item instead of typing it in). If you have done all this, the "Write" stage should most definitely enter the password into the password field. Good luck!

How to do not reset search results in Yii zii.widgets.grid.cgridview

I have zii.widgets.grid.cgridview on admin page, and when I search some records and visit view one of them, and after return to admin page results is reseted. May I save them someway?
As a suggestion:
First disable Ajax update in your CGridView's view:
'ajaxUpdate' => false
Now, it sends data via GET request. If you save the current GET, it would be possible to use the result later. It is accessible with:
$_GET['YOUR_MODEL_NAME'];
If you want to use it in somewhere else, you can get values from GET and put it into a CDBCriteria.
Others might offer another way.

Permission error when saving a document

I've workflow application using 8 xpages. It was working fine upto this moment and all of sudden when saving new document for any xpage, it started giving the following error:
Unexpected runtime error
The runtime has encountered an unexpected error.
Error source
Page Name:/XpNew.xsp
Exception
Error saving data source document1
Could not save the document 44F2A NotesException: Notes error: You cannot update or delete the document(s) since you are not listed as an allowable Author for this document
Even though I've manager access to the database. It is also weird that it started giving error on test and production server. I also ran compact with -c and still the same issue.
Ran Fixup and still same issue.
In this situation, since it appears to be a core Notes exception and not anything at the XSP layer, I'd look into ACLs first. Are you manager by way of being in a group? And if so, has that group changed in any way recently, or is it specified in a secondary Directory referenced via Directory Assistance? I've had situations where the HTTP task just sort of "forgets" group membership from a secondary Directory until I restart it.
Another potential source of trouble could be the "Maximum Internet name and password" field on the database's ACL's Advanced tab - if that's set to Author, it will override whatever your real access is.
As a troubleshooting step, I'd make an XPage with this in a computed text item:
database.queryAccess(session.getEffectiveUserName());
That should return your numeric access level. Additionally, to check on the first paragraph's theory, you could add a Form or Page with a computed value of:
#UserNamesList
That will give you a list of all effective names, groups, and roles for the current user in the current database.
There was a Authors field on Notes form with value #Username which was returning value in hierarchical form as First Name/Company.
Changed the formula to #Name([Canonicalize];#UserName) and Maximum access Level thru web kept default editor. This resolve the issue. Now it is saving documents without any issue.
Thanks everybody for help

AccessDenied.aspx / List does not exist on list that user has access to

I am getting this error:
List does not exist
The page you selected contains a list that does not exist. It may have been deleted by another user. at Microsoft.SharePoint.Library.SPRequestInternalClass.GetListsWithCallback...
Unfortunately it's not the unpublished masterpage manifestation of the error - the list GUID in the query string leads to one of several lists in the root web that are used to display user settings in controls on the master page.
The list is being accessed using the following code:
_RootWeb = SPContext.Current.Site.RootWeb;
storageList = _RootWeb.GetList(_RootWeb.Url + "/Lists/" +
LocalStrings.TimeZoneStorageList.ListName);
SPListItemCollection result = list.GetItems(query);
SPListItem StorageItem = result[0];
xmlDoc.LoadXml(StorageItem[LocalStrings.TimeZoneStorageList.Fields.UserXML]
.ToString());
Is there anything that could cause that code to throw an AccessDeniedException while the user is able to access the list through the UI?
Alternatively, is it possible for SharePoint to report a list as the source of the error when the permissions issue is actually somewhere else entirely?
Is there anything that could cause
that code to throw an
AccessDeniedException while the user
is able to access the list through the
UI?
This might not apply in your case, but yes, I have had this happen with:
Lookup fields where the user did not have permissions to the lookup list
People fields filtered to a chosen SharePoint Group where the user did not have permissions to view the membership of the group.
In both cases, these fields were not included in the views or forms normally used by the user so the problem was not immediately discovered.
Can you try getting your list as
_RootWeb.Lists[strListName]
where strListName is the Title of the list.
The List ID in the query string on AccessDenied.aspx can in fact be unrelated to the actual error.
The relevant code was something like
try {
throw new AccessDeniedException();
}
catch (Exception ex) {}
storageList = _RootWeb.GetList(ListUrl);
If CatchAccessDeniedException is not disabled, SharePoint will see the exception despite the catch and abort the thread. Since this is controlled on another thread, it's not synchronous and the code continues to run long enough that the thread aborts in the middle of accessing the list.
Both parts of the error message are technically correct - There was an AccessDeniedException, and the last operation was trying to open the list - but there is no actual connection between the two.
The actual problem turned out to be service account permissions on mysites, which naturally never appeared in any logs or error messages.
The issue for me was quite simple. I had a user who had permissions to the current site, which was fine. However, there was a list web part on the page I got the error that accessed items from a sub site in which the current user didn't have access.
In my case the error should have read "access denied for list".

Resources